| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_SQLITEUTILS_H_ | 5 #ifndef CHROME_COMMON_SQLITEUTILS_H_ |
| 6 #define CHROME_COMMON_SQLITEUTILS_H_ | 6 #define CHROME_COMMON_SQLITEUTILS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 | 12 |
| 13 #include "third_party/sqlite/sqlite3.h" | 13 #include "third_party/sqlite/preprocessed/sqlite3.h" |
| 14 | 14 |
| 15 // forward declarations of classes defined here | 15 // forward declarations of classes defined here |
| 16 class SQLTransaction; | 16 class SQLTransaction; |
| 17 class SQLNestedTransaction; | 17 class SQLNestedTransaction; |
| 18 class SQLNestedTransactionSite; | 18 class SQLNestedTransactionSite; |
| 19 class scoped_sqlite3_stmt_ptr; | 19 class scoped_sqlite3_stmt_ptr; |
| 20 class SQLStatement; | 20 class SQLStatement; |
| 21 | 21 |
| 22 //------------------------------------------------------------------------------ | 22 //------------------------------------------------------------------------------ |
| 23 // A wrapper for sqlite transactions that rollsback when the wrapper | 23 // A wrapper for sqlite transactions that rollsback when the wrapper |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 const char* column_type) { | 340 const char* column_type) { |
| 341 return DoesSqliteColumnExist(db, NULL, table_name, column_name, column_type); | 341 return DoesSqliteColumnExist(db, NULL, table_name, column_name, column_type); |
| 342 } | 342 } |
| 343 | 343 |
| 344 // Test whether a table has one or more rows. Returns true if the table | 344 // Test whether a table has one or more rows. Returns true if the table |
| 345 // has one or more rows and false if the table is empty or doesn't exist. | 345 // has one or more rows and false if the table is empty or doesn't exist. |
| 346 bool DoesSqliteTableHaveRow(sqlite3* db, const char* table_name); | 346 bool DoesSqliteTableHaveRow(sqlite3* db, const char* table_name); |
| 347 | 347 |
| 348 #endif // CHROME_COMMON_SQLITEUTILS_H_ | 348 #endif // CHROME_COMMON_SQLITEUTILS_H_ |
| 349 | 349 |
| OLD | NEW |