| 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 #ifndef SQL_STATEMENT_H_ | 5 #ifndef SQL_STATEMENT_H_ |
| 6 #define SQL_STATEMENT_H_ | 6 #define SQL_STATEMENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 int64_t ColumnInt64(int col) const; | 132 int64_t ColumnInt64(int col) const; |
| 133 double ColumnDouble(int col) const; | 133 double ColumnDouble(int col) const; |
| 134 std::string ColumnString(int col) const; | 134 std::string ColumnString(int col) const; |
| 135 base::string16 ColumnString16(int col) const; | 135 base::string16 ColumnString16(int col) const; |
| 136 | 136 |
| 137 // When reading a blob, you can get a raw pointer to the underlying data, | 137 // When reading a blob, you can get a raw pointer to the underlying data, |
| 138 // along with the length, or you can just ask us to copy the blob into a | 138 // along with the length, or you can just ask us to copy the blob into a |
| 139 // vector. Danger! ColumnBlob may return NULL if there is no data! | 139 // vector. Danger! ColumnBlob may return NULL if there is no data! |
| 140 int ColumnByteLength(int col) const; | 140 int ColumnByteLength(int col) const; |
| 141 const void* ColumnBlob(int col) const; | 141 const void* ColumnBlob(int col) const; |
| 142 bool ColumnBlobAsString(int col, std::string* blob); | 142 bool ColumnBlobAsString(int col, std::string* blob) const; |
| 143 bool ColumnBlobAsString16(int col, base::string16* val) const; | 143 bool ColumnBlobAsString16(int col, base::string16* val) const; |
| 144 bool ColumnBlobAsVector(int col, std::vector<char>* val) const; | 144 bool ColumnBlobAsVector(int col, std::vector<char>* val) const; |
| 145 bool ColumnBlobAsVector(int col, std::vector<unsigned char>* val) const; | 145 bool ColumnBlobAsVector(int col, std::vector<unsigned char>* val) const; |
| 146 | 146 |
| 147 // Diagnostics -------------------------------------------------------------- | 147 // Diagnostics -------------------------------------------------------------- |
| 148 | 148 |
| 149 // Returns the original text of sql statement. Do not keep a pointer to it. | 149 // Returns the original text of sql statement. Do not keep a pointer to it. |
| 150 const char* GetSQLStatement(); | 150 const char* GetSQLStatement(); |
| 151 | 151 |
| 152 private: | 152 private: |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 // See Succeeded() for what this holds. | 199 // See Succeeded() for what this holds. |
| 200 bool succeeded_; | 200 bool succeeded_; |
| 201 | 201 |
| 202 DISALLOW_COPY_AND_ASSIGN(Statement); | 202 DISALLOW_COPY_AND_ASSIGN(Statement); |
| 203 }; | 203 }; |
| 204 | 204 |
| 205 } // namespace sql | 205 } // namespace sql |
| 206 | 206 |
| 207 #endif // SQL_STATEMENT_H_ | 207 #endif // SQL_STATEMENT_H_ |
| OLD | NEW |