Lines Matching refs:col

95 bool Statement::BindNull(int col) {
100 return CheckOk(sqlite3_bind_null(ref_->stmt(), col + 1));
103 bool Statement::BindBool(int col, bool val) {
104 return BindInt(col, val ? 1 : 0);
107 bool Statement::BindInt(int col, int val) {
112 return CheckOk(sqlite3_bind_int(ref_->stmt(), col + 1, val));
115 bool Statement::BindInt64(int col, int64 val) {
120 return CheckOk(sqlite3_bind_int64(ref_->stmt(), col + 1, val));
123 bool Statement::BindDouble(int col, double val) {
128 return CheckOk(sqlite3_bind_double(ref_->stmt(), col + 1, val));
131 bool Statement::BindCString(int col, const char* val) {
137 sqlite3_bind_text(ref_->stmt(), col + 1, val, -1, SQLITE_TRANSIENT));
140 bool Statement::BindString(int col, const std::string& val) {
146 col + 1,
152 bool Statement::BindString16(int col, const base::string16& value) {
153 return BindString(col, base::UTF16ToUTF8(value));
156 bool Statement::BindBlob(int col, const void* val, int val_len) {
162 sqlite3_bind_blob(ref_->stmt(), col + 1, val, val_len, SQLITE_TRANSIENT));
172 ColType Statement::ColumnType(int col) const {
180 return static_cast<ColType>(sqlite3_column_type(ref_->stmt(), col));
183 ColType Statement::DeclaredColumnType(int col) const {
184 std::string column_type(sqlite3_column_decltype(ref_->stmt(), col));
199 bool Statement::ColumnBool(int col) const {
200 return !!ColumnInt(col);
203 int Statement::ColumnInt(int col) const {
207 return sqlite3_column_int(ref_->stmt(), col);
210 int64 Statement::ColumnInt64(int col) const {
214 return sqlite3_column_int64(ref_->stmt(), col);
217 double Statement::ColumnDouble(int col) const {
221 return sqlite3_column_double(ref_->stmt(), col);
224 std::string Statement::ColumnString(int col) const {
229 sqlite3_column_text(ref_->stmt(), col));
230 int len = sqlite3_column_bytes(ref_->stmt(), col);
238 base::string16 Statement::ColumnString16(int col) const {
242 std::string s = ColumnString(col);
246 int Statement::ColumnByteLength(int col) const {
250 return sqlite3_column_bytes(ref_->stmt(), col);
253 const void* Statement::ColumnBlob(int col) const {
257 return sqlite3_column_blob(ref_->stmt(), col);
260 bool Statement::ColumnBlobAsString(int col, std::string* blob) {
264 const void* p = ColumnBlob(col);
265 size_t len = ColumnByteLength(col);
274 bool Statement::ColumnBlobAsString16(int col, base::string16* val) const {
278 const void* data = ColumnBlob(col);
279 size_t len = ColumnByteLength(col) / sizeof(base::char16);
287 bool Statement::ColumnBlobAsVector(int col, std::vector<char>* val) const {
293 const void* data = sqlite3_column_blob(ref_->stmt(), col);
294 int len = sqlite3_column_bytes(ref_->stmt(), col);
303 int col,
305 return ColumnBlobAsVector(col, reinterpret_cast< std::vector<char>* >(val));