diff options
author | gbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-25 00:40:33 +0000 |
---|---|---|
committer | gbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-25 00:40:33 +0000 |
commit | 28fe0ffbf8c177f71381f83e281d4d0af0455f78 (patch) | |
tree | 2f0c21fe99657ce52f589ff971fb57572f64d6e8 /sql/connection.cc | |
parent | 11327b6f0e619f65f7f2196f24951a2420dd1945 (diff) | |
download | chromium_src-28fe0ffbf8c177f71381f83e281d4d0af0455f78.zip chromium_src-28fe0ffbf8c177f71381f83e281d4d0af0455f78.tar.gz chromium_src-28fe0ffbf8c177f71381f83e281d4d0af0455f78.tar.bz2 |
Remove operator overloads from Statement.
Fix leftover users of operators.
R=shess@chromium.org
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
Diffstat (limited to 'sql/connection.cc')
-rw-r--r-- | sql/connection.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/connection.cc b/sql/connection.cc index 58819a7..07e6af2 100644 --- a/sql/connection.cc +++ b/sql/connection.cc @@ -230,10 +230,11 @@ int Connection::ExecuteAndReturnErrorCode(const char* sql) { 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 @@ bool Connection::DoesTableOrIndexExist( "WHERE type=? AND name=?")); statement.BindString(0, type); statement.BindString(1, name); + return statement.Step(); // Table exists if any row was returned. } |