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

Side by Side Diff: sql/statement.h

Issue 40733003: [sql] Complain about statement mutations after stepping has started. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment tweak Created 7 years, 1 month 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 | « no previous file | 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 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // situations may. Therefore, the code is handling disjoint situations in 171 // situations may. Therefore, the code is handling disjoint situations in
172 // release and test. In test, we're ensuring correct SQL. In release, we're 172 // release and test. In test, we're ensuring correct SQL. In release, we're
173 // ensuring that contracts are honored in error edge cases. 173 // ensuring that contracts are honored in error edge cases.
174 bool CheckValid() const; 174 bool CheckValid() const;
175 175
176 // The actual sqlite statement. This may be unique to us, or it may be cached 176 // The actual sqlite statement. This may be unique to us, or it may be cached
177 // by the connection, which is why it's refcounted. This pointer is 177 // by the connection, which is why it's refcounted. This pointer is
178 // guaranteed non-NULL. 178 // guaranteed non-NULL.
179 scoped_refptr<Connection::StatementRef> ref_; 179 scoped_refptr<Connection::StatementRef> ref_;
180 180
181 // Set after Step() or Run() are called, reset by Reset(). Used to
182 // prevent accidental calls to API functions which would not work
183 // correctly after stepping has started.
184 bool stepped_;
185
181 // See Succeeded() for what this holds. 186 // See Succeeded() for what this holds.
182 bool succeeded_; 187 bool succeeded_;
183 188
184 DISALLOW_COPY_AND_ASSIGN(Statement); 189 DISALLOW_COPY_AND_ASSIGN(Statement);
185 }; 190 };
186 191
187 } // namespace sql 192 } // namespace sql
188 193
189 #endif // SQL_STATEMENT_H_ 194 #endif // SQL_STATEMENT_H_
OLDNEW
« no previous file with comments | « no previous file | sql/statement.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698