Remove operator overloads from Statement.
Fix leftover users of operators.
[email protected]
BUG=None
TEST=sql_unittests,unit_tests
Review URL: http://codereview.chromium.org/9433022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123609 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/sql/connection.cc b/sql/connection.cc
index 58819a7f..07e6af2 100644
--- a/sql/connection.cc
+++ b/sql/connection.cc
@@ -230,10 +230,11 @@
bool Connection::Execute(const char* sql) {
int error = ExecuteAndReturnErrorCode(sql);
- // TODO(shess,gbillock): DLOG(FATAL) once Execute() clients are
- // converted.
+ // This needs to be a FATAL log because the error case of arriving here is
+ // that there's a malformed SQL statement. This can arise in development if
+ // a change alters the schema but not all queries adjust.
if (error == SQLITE_ERROR)
- DLOG(ERROR) << "SQL Error in " << sql << ", " << GetErrorMessage();
+ DLOG(FATAL) << "SQL Error in " << sql << ", " << GetErrorMessage();
return error == SQLITE_OK;
}
@@ -310,6 +311,7 @@
"WHERE type=? AND name=?"));
statement.BindString(0, type);
statement.BindString(1, name);
+
return statement.Step(); // Table exists if any row was returned.
}