Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: sql/statement.h

Issue 10171014: Changed to Reset(bool clear_bound_vars) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac build error. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sql/connection_unittest.cc ('k') | sql/statement.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SQL_STATEMENT_H_ 5 #ifndef SQL_STATEMENT_H_
6 #define SQL_STATEMENT_H_ 6 #define SQL_STATEMENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // or there is an error. This makes it most convenient for loop usage. If you 80 // or there is an error. This makes it most convenient for loop usage. If you
81 // need to disambiguate these cases, use Succeeded(). 81 // need to disambiguate these cases, use Succeeded().
82 // 82 //
83 // Typical example: 83 // Typical example:
84 // while (s.Step()) { 84 // while (s.Step()) {
85 // ... 85 // ...
86 // } 86 // }
87 // return s.Succeeded(); 87 // return s.Succeeded();
88 bool Step(); 88 bool Step();
89 89
90 // Resets the statement to its initial condition. This includes clearing all 90 // Resets the statement to its initial condition. This includes any current
91 // the bound variables and any current result row. 91 // result row, and also the bound variables if the |clear_bound_vars| is true.
92 void Reset(); 92 void Reset(bool clear_bound_vars);
93 93
94 // Returns true if the last executed thing in this statement succeeded. If 94 // Returns true if the last executed thing in this statement succeeded. If
95 // there was no last executed thing or the statement is invalid, this will 95 // there was no last executed thing or the statement is invalid, this will
96 // return false. 96 // return false.
97 bool Succeeded() const; 97 bool Succeeded() const;
98 98
99 // Binding ------------------------------------------------------------------- 99 // Binding -------------------------------------------------------------------
100 100
101 // These all take a 0-based argument index and return true on success. You 101 // These all take a 0-based argument index and return true on success. You
102 // may not always care about the return value (they'll DCHECK if they fail). 102 // may not always care about the return value (they'll DCHECK if they fail).
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 // See Succeeded() for what this holds. 182 // See Succeeded() for what this holds.
183 bool succeeded_; 183 bool succeeded_;
184 184
185 DISALLOW_COPY_AND_ASSIGN(Statement); 185 DISALLOW_COPY_AND_ASSIGN(Statement);
186 }; 186 };
187 187
188 } // namespace sql 188 } // namespace sql
189 189
190 #endif // SQL_STATEMENT_H_ 190 #endif // SQL_STATEMENT_H_
OLDNEW
« no previous file with comments | « sql/connection_unittest.cc ('k') | sql/statement.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698