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

Unified Diff: sql/connection.h

Issue 1069313004: [sql] Change DoesStuffExist() to work with ScopedErrorIgnorer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sql/connection.cc » ('j') | sql/connection.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/connection.h
diff --git a/sql/connection.h b/sql/connection.h
index 5bbdb972d63ffcc6a0d3e74615b4e2d6b6474761..2f6c71ffccf1a2cc1489b2fbb3be97e0db45f1be 100644
--- a/sql/connection.h
+++ b/sql/connection.h
@@ -361,10 +361,10 @@ class SQL_EXPORT Connection {
// Info querying -------------------------------------------------------------
- // Returns true if the given table exists.
+ // Returns true if the given table (or index) exists. Instead of
+ // test-then-create, callers should almost always prefer "CREATE TABLE IF NOT
+ // EXISTS" or "CREATE INDEX IF NOT EXISTS".
bool DoesTableExist(const char* table_name) const;
-
- // Returns true if the given index exists.
bool DoesIndexExist(const char* index_name) const;
// Returns true if a column with the given name exists in the given table.
« no previous file with comments | « no previous file | sql/connection.cc » ('j') | sql/connection.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698