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

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: Fix build breaks. BUILD.gn needs to follow sql.gyp, tracker had histogram tag set after open, EVEN… 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
Index: sql/statement.h
diff --git a/sql/statement.h b/sql/statement.h
index b411e809b6ca9cee8f6792cb7135db81f2d6fc92..6091a552141c341bd31a962e10c9661260743e90 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,14 @@ 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 histograms based on
+ // the results. The checked value from sqlite3_step() is returned.
rmcilroy 2015/05/21 22:54:48 "and histograms based on the results if |timer_fla
Scott Hess - ex-Googler 2015/05/21 23:42:37 Done, maybe, but in terms of "How would I use this
+ int InnerStep(bool timer_flag);
rmcilroy 2015/05/21 22:54:48 Maybe call StepInternal would be clearer?
Scott Hess - ex-Googler 2015/05/21 23:42:37 Done.
+
+ // 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.

Powered by Google App Engine
This is Rietveld 408576698