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

Unified 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: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sql/statement.cc » ('j') | sql/statement.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/statement.h
diff --git a/sql/statement.h b/sql/statement.h
index 5fedc53a09b1bd25c749693b33185f6ab730d465..e3e2c44ae02aeadbc552fb36389cb8be03cc08ee 100644
--- a/sql/statement.h
+++ b/sql/statement.h
@@ -178,6 +178,11 @@ class SQL_EXPORT Statement {
// guaranteed non-NULL.
scoped_refptr<Connection::StatementRef> ref_;
+ // Set after Step() or Run() are called, reset by Reset(). Used to
+ // prevent accidental calls to API functions which would not work
+ // right after stepping has started.
+ bool stepped_;
+
// See Succeeded() for what this holds.
bool succeeded_;
« no previous file with comments | « no previous file | sql/statement.cc » ('j') | sql/statement.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698