Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: sql/meta_table.h

Issue 9584031: Add a DeleteKey() method to delete a key from the meta table. This will be used in the TemplateURL… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sql/meta_table.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 bool SetValue(const char* key, const std::string& value); 61 bool SetValue(const char* key, const std::string& value);
62 bool SetValue(const char* key, int value); 62 bool SetValue(const char* key, int value);
63 bool SetValue(const char* key, int64 value); 63 bool SetValue(const char* key, int64 value);
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 // Deletes the key from the table.
72 bool DeleteKey(const char* key);
73
71 private: 74 private:
72 // Conveniences to prepare the two types of statements used by 75 // Conveniences to prepare the two types of statements used by
73 // MetaTableHelper. 76 // MetaTableHelper.
74 void PrepareSetStatement(Statement* statement, const char* key); 77 void PrepareSetStatement(Statement* statement, const char* key);
75 bool PrepareGetStatement(Statement* statement, const char* key); 78 bool PrepareGetStatement(Statement* statement, const char* key);
76 79
77 Connection* db_; 80 Connection* db_;
78 81
79 DISALLOW_COPY_AND_ASSIGN(MetaTable); 82 DISALLOW_COPY_AND_ASSIGN(MetaTable);
80 }; 83 };
81 84
82 } // namespace sql 85 } // namespace sql
83 86
84 #endif // SQL_META_TABLE_H_ 87 #endif // SQL_META_TABLE_H_
OLDNEW
« no previous file with comments | « no previous file | sql/meta_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698