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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "sql/connection.h" | 9 #include "sql/connection.h" |
10 #include "sql/statement.h" | 10 #include "sql/statement.h" |
11 #include "sql/transaction.h" | 11 #include "sql/transaction.h" |
12 | 12 |
13 namespace sql { | 13 namespace sql { |
14 | 14 |
15 // Key used in our meta table for version numbers. | 15 // Key used in our meta table for version numbers. |
16 static const char kVersionKey[] = "version"; | 16 static const char kVersionKey[] = "version"; |
17 static const char kCompatibleVersionKey[] = "last_compatible_version"; | 17 static const char kCompatibleVersionKey[] = "last_compatible_version"; |
18 | 18 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 bool MetaTable::PrepareGetStatement(Statement* statement, const char* key) { | 147 bool MetaTable::PrepareGetStatement(Statement* statement, const char* key) { |
148 DCHECK(db_ && statement); | 148 DCHECK(db_ && statement); |
149 statement->Assign(db_->GetCachedStatement(SQL_FROM_HERE, | 149 statement->Assign(db_->GetCachedStatement(SQL_FROM_HERE, |
150 "SELECT value FROM meta WHERE key=?")); | 150 "SELECT value FROM meta WHERE key=?")); |
151 statement->BindCString(0, key); | 151 statement->BindCString(0, key); |
152 return statement->Step(); | 152 return statement->Step(); |
153 } | 153 } |
154 | 154 |
155 } // namespace sql | 155 } // namespace sql |
OLD | NEW |