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

Unified Diff: sql/statement.h

Issue 1145833002: [sql] Stats gathering for sql/ APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: asvitkine nits. Created 5 years, 7 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 | « sql/sql.gyp ('k') | sql/statement.cc » ('j') | no next file with comments »
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 b411e809b6ca9cee8f6792cb7135db81f2d6fc92..83a5a2dfa83aeabc30460886bcd5d146a2067fe2 100644
--- a/sql/statement.h
+++ b/sql/statement.h
@@ -150,6 +150,8 @@ class SQL_EXPORT Statement {
const char* GetSQLStatement();
private:
+ friend class Connection;
+
// This is intended to check for serious errors and report them to the
// connection object. It takes a sqlite error code, and returns the same
// code. Currently this function just updates the succeeded flag, but will be
@@ -174,6 +176,16 @@ class SQL_EXPORT Statement {
// ensuring that contracts are honored in error edge cases.
bool CheckValid() const;
+ // Helper for Run() and Step(), calls sqlite3_step() and then generates
+ // sql::Connection histograms based on the results. Timing and change count
+ // are only recorded if |timer_flag| is true. The checked value from
+ // sqlite3_step() is returned.
+ int StepInternal(bool timer_flag);
+
+ // sql::Connection uses cached statments for transactions, but tracks their
+ // runtime independently.
+ bool RunWithoutTimers();
+
// The actual sqlite statement. This may be unique to us, or it may be cached
// by the connection, which is why it's refcounted. This pointer is
// guaranteed non-NULL.
« no previous file with comments | « sql/sql.gyp ('k') | sql/statement.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698