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 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 // Retrieves the value associated with the given key. This will use sqlite's | 65 // Retrieves the value associated with the given key. This will use sqlite's |
66 // type conversion rules. It will return true on success. | 66 // type conversion rules. It will return true on success. |
67 bool GetValue(const char* key, std::string* value); | 67 bool GetValue(const char* key, std::string* value); |
68 bool GetValue(const char* key, int* value); | 68 bool GetValue(const char* key, int* value); |
69 bool GetValue(const char* key, int64* value); | 69 bool GetValue(const char* key, int64* value); |
70 | 70 |
71 private: | 71 private: |
72 // Conveniences to prepare the two types of statements used by | 72 // Conveniences to prepare the two types of statements used by |
73 // MetaTableHelper. | 73 // MetaTableHelper. |
74 bool PrepareSetStatement(Statement* statement, const char* key); | 74 void PrepareSetStatement(Statement* statement, const char* key); |
75 bool PrepareGetStatement(Statement* statement, const char* key); | 75 bool PrepareGetStatement(Statement* statement, const char* key); |
76 | 76 |
77 Connection* db_; | 77 Connection* db_; |
78 | 78 |
79 DISALLOW_COPY_AND_ASSIGN(MetaTable); | 79 DISALLOW_COPY_AND_ASSIGN(MetaTable); |
80 }; | 80 }; |
81 | 81 |
82 } // namespace sql | 82 } // namespace sql |
83 | 83 |
84 #endif // SQL_META_TABLE_H_ | 84 #endif // SQL_META_TABLE_H_ |
OLD | NEW |