diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-29 18:24:01 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-29 18:24:01 +0000 |
commit | ab184cc284a629e1139363257d1b9082b4cb2e33 (patch) | |
tree | 384f681e12898a3c2ff7c3c7e38aa9ba57583d63 /chrome/browser/history | |
parent | 70f45c3f2b52eb71f15e707c9f21ff98c221758e (diff) | |
download | chromium_src-ab184cc284a629e1139363257d1b9082b4cb2e33.zip chromium_src-ab184cc284a629e1139363257d1b9082b4cb2e33.tar.gz chromium_src-ab184cc284a629e1139363257d1b9082b4cb2e33.tar.bz2 |
Trivial patch: add whitespace to some SQL statements to turn "INSERT INTO foo(bar,baz)VALUES(?,?)" into "INSERT INTO foo (bar, baz) VALUES (?,?)" (which is the way we have it in most of our code).
This was annoying me while I tried to track down cases where we omitted the appropriate fieldnames from our SQL statements.
Review URL: http://codereview.chromium.org/8855
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history')
-rw-r--r-- | chrome/browser/history/text_database.cc | 4 | ||||
-rw-r--r-- | chrome/browser/history/url_database.cc | 6 | ||||
-rw-r--r-- | chrome/browser/history/visit_database.cc | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/history/text_database.cc b/chrome/browser/history/text_database.cc index ef1d706..482db21 100644 --- a/chrome/browser/history/text_database.cc +++ b/chrome/browser/history/text_database.cc @@ -228,7 +228,7 @@ bool TextDatabase::AddPageData(Time time, // Add to the pages table. SQLITE_UNIQUE_STATEMENT(add_to_pages, *statement_cache_, - "INSERT INTO pages(url,title,body)VALUES(?,?,?)"); + "INSERT INTO pages (url, title, body) VALUES (?,?,?)"); if (!add_to_pages.is_valid()) return false; add_to_pages->bind_string(0, url); @@ -243,7 +243,7 @@ bool TextDatabase::AddPageData(Time time, // Add to the info table with the same rowid. SQLITE_UNIQUE_STATEMENT(add_to_info, *statement_cache_, - "INSERT INTO info(rowid,time) VALUES(?,?)"); + "INSERT INTO info (rowid, time) VALUES (?,?)"); if (!add_to_info.is_valid()) return false; add_to_info->bind_int64(0, rowid); diff --git a/chrome/browser/history/url_database.cc b/chrome/browser/history/url_database.cc index 83b038b..b8bf2c9 100644 --- a/chrome/browser/history/url_database.cc +++ b/chrome/browser/history/url_database.cc @@ -113,9 +113,9 @@ URLID URLDatabase::AddURLInternal(const history::URLRow& info, // HISTORY_URL_ROW_FIELDS because that specifies the table name which is // invalid in the insert syntax. #define ADDURL_COMMON_SUFFIX \ - "(url,title,visit_count,typed_count,"\ - "last_visit_time,hidden,favicon_id)"\ - "VALUES(?,?,?,?,?,?,?)" + " (url, title, visit_count, typed_count, "\ + "last_visit_time, hidden, favicon_id) "\ + "VALUES (?,?,?,?,?,?,?)" const char* statement_name; const char* statement_sql; if (is_temporary) { diff --git a/chrome/browser/history/visit_database.cc b/chrome/browser/history/visit_database.cc index fbba4d4..09f1231 100644 --- a/chrome/browser/history/visit_database.cc +++ b/chrome/browser/history/visit_database.cc @@ -101,9 +101,9 @@ void VisitDatabase::FillVisitVector(SQLStatement& statement, VisitID VisitDatabase::AddVisit(VisitRow* visit) { SQLITE_UNIQUE_STATEMENT(statement, GetStatementCache(), - "INSERT INTO visits(" - "url,visit_time,from_visit,transition,segment_id,is_indexed)" - "VALUES(?,?,?,?,?,?)"); + "INSERT INTO visits " + "(url, visit_time, from_visit, transition, segment_id, is_indexed) " + "VALUES (?,?,?,?,?,?)"); if (!statement.is_valid()) return 0; |