OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 SQL_META_TABLE_H_ | 5 #ifndef SQL_META_TABLE_H_ |
6 #define SQL_META_TABLE_H_ | 6 #define SQL_META_TABLE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "sql/sql_export.h" |
12 | 13 |
13 namespace sql { | 14 namespace sql { |
14 | 15 |
15 class Connection; | 16 class Connection; |
16 class Statement; | 17 class Statement; |
17 | 18 |
18 class MetaTable { | 19 class SQL_EXPORT MetaTable { |
19 public: | 20 public: |
20 MetaTable(); | 21 MetaTable(); |
21 ~MetaTable(); | 22 ~MetaTable(); |
22 | 23 |
23 // Returns true if the 'meta' table exists. | 24 // Returns true if the 'meta' table exists. |
24 static bool DoesTableExist(Connection* db); | 25 static bool DoesTableExist(Connection* db); |
25 | 26 |
26 // Initializes the MetaTableHelper, creating the meta table if necessary. For | 27 // Initializes the MetaTableHelper, creating the meta table if necessary. For |
27 // new tables, it will initialize the version number to |version| and the | 28 // new tables, it will initialize the version number to |version| and the |
28 // compatible version number to |compatible_version|. | 29 // compatible version number to |compatible_version|. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 bool PrepareGetStatement(Statement* statement, const char* key); | 75 bool PrepareGetStatement(Statement* statement, const char* key); |
75 | 76 |
76 Connection* db_; | 77 Connection* db_; |
77 | 78 |
78 DISALLOW_COPY_AND_ASSIGN(MetaTable); | 79 DISALLOW_COPY_AND_ASSIGN(MetaTable); |
79 }; | 80 }; |
80 | 81 |
81 } // namespace sql | 82 } // namespace sql |
82 | 83 |
83 #endif // SQL_META_TABLE_H_ | 84 #endif // SQL_META_TABLE_H_ |
OLD | NEW |