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_STATEMENT_H_ | 5 #ifndef SQL_STATEMENT_H_ |
6 #define SQL_STATEMENT_H_ | 6 #define SQL_STATEMENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // Returns the number of output columns in the result. | 119 // Returns the number of output columns in the result. |
120 int ColumnCount() const; | 120 int ColumnCount() const; |
121 | 121 |
122 // Returns the type associated with the given column. | 122 // Returns the type associated with the given column. |
123 // | 123 // |
124 // Watch out: the type may be undefined if you've done something to cause a | 124 // Watch out: the type may be undefined if you've done something to cause a |
125 // "type conversion." This means requesting the value of a column of a type | 125 // "type conversion." This means requesting the value of a column of a type |
126 // where that type is not the native type. For safety, call ColumnType only | 126 // where that type is not the native type. For safety, call ColumnType only |
127 // on a column before getting the value out in any way. | 127 // on a column before getting the value out in any way. |
128 ColType ColumnType(int col) const; | 128 ColType ColumnType(int col) const; |
| 129 ColType DeclaredColumnType(int col) const; |
129 | 130 |
130 // These all take a 0-based argument index. | 131 // These all take a 0-based argument index. |
131 bool ColumnBool(int col) const; | 132 bool ColumnBool(int col) const; |
132 int ColumnInt(int col) const; | 133 int ColumnInt(int col) const; |
133 int64 ColumnInt64(int col) const; | 134 int64 ColumnInt64(int col) const; |
134 double ColumnDouble(int col) const; | 135 double ColumnDouble(int col) const; |
135 std::string ColumnString(int col) const; | 136 std::string ColumnString(int col) const; |
136 string16 ColumnString16(int col) const; | 137 string16 ColumnString16(int col) const; |
137 | 138 |
138 // When reading a blob, you can get a raw pointer to the underlying data, | 139 // When reading a blob, you can get a raw pointer to the underlying data, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 182 |
182 // See Succeeded() for what this holds. | 183 // See Succeeded() for what this holds. |
183 bool succeeded_; | 184 bool succeeded_; |
184 | 185 |
185 DISALLOW_COPY_AND_ASSIGN(Statement); | 186 DISALLOW_COPY_AND_ASSIGN(Statement); |
186 }; | 187 }; |
187 | 188 |
188 } // namespace sql | 189 } // namespace sql |
189 | 190 |
190 #endif // SQL_STATEMENT_H_ | 191 #endif // SQL_STATEMENT_H_ |
OLD | NEW |