OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "sql/meta_table.h" | 5 #include "sql/meta_table.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram_macros.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "sql/connection.h" | 12 #include "sql/connection.h" |
13 #include "sql/statement.h" | 13 #include "sql/statement.h" |
14 #include "sql/transaction.h" | 14 #include "sql/transaction.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 // Keys understood directly by sql:MetaTable. | 18 // Keys understood directly by sql:MetaTable. |
19 const char kVersionKey[] = "version"; | 19 const char kVersionKey[] = "version"; |
20 const char kCompatibleVersionKey[] = "last_compatible_version"; | 20 const char kCompatibleVersionKey[] = "last_compatible_version"; |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 266 |
267 bool MetaTable::PrepareGetStatement(Statement* statement, const char* key) { | 267 bool MetaTable::PrepareGetStatement(Statement* statement, const char* key) { |
268 DCHECK(db_ && statement); | 268 DCHECK(db_ && statement); |
269 statement->Assign(db_->GetCachedStatement(SQL_FROM_HERE, | 269 statement->Assign(db_->GetCachedStatement(SQL_FROM_HERE, |
270 "SELECT value FROM meta WHERE key=?")); | 270 "SELECT value FROM meta WHERE key=?")); |
271 statement->BindCString(0, key); | 271 statement->BindCString(0, key); |
272 return statement->Step(); | 272 return statement->Step(); |
273 } | 273 } |
274 | 274 |
275 } // namespace sql | 275 } // namespace sql |
OLD | NEW |