Lines Matching refs:col
89 bool Statement::BindNull(int col) {
93 return CheckOk(sqlite3_bind_null(ref_->stmt(), col + 1));
96 bool Statement::BindBool(int col, bool val) {
97 return BindInt(col, val ? 1 : 0);
100 bool Statement::BindInt(int col, int val) {
104 return CheckOk(sqlite3_bind_int(ref_->stmt(), col + 1, val));
107 bool Statement::BindInt64(int col, int64 val) {
111 return CheckOk(sqlite3_bind_int64(ref_->stmt(), col + 1, val));
114 bool Statement::BindDouble(int col, double val) {
118 return CheckOk(sqlite3_bind_double(ref_->stmt(), col + 1, val));
121 bool Statement::BindCString(int col, const char* val) {
126 sqlite3_bind_text(ref_->stmt(), col + 1, val, -1, SQLITE_TRANSIENT));
129 bool Statement::BindString(int col, const std::string& val) {
134 col + 1,
140 bool Statement::BindString16(int col, const string16& value) {
141 return BindString(col, UTF16ToUTF8(value));
144 bool Statement::BindBlob(int col, const void* val, int val_len) {
149 sqlite3_bind_blob(ref_->stmt(), col + 1, val, val_len, SQLITE_TRANSIENT));
159 ColType Statement::ColumnType(int col) const {
167 return static_cast<ColType>(sqlite3_column_type(ref_->stmt(), col));
170 ColType Statement::DeclaredColumnType(int col) const {
171 std::string column_type(sqlite3_column_decltype(ref_->stmt(), col));
186 bool Statement::ColumnBool(int col) const {
187 return !!ColumnInt(col);
190 int Statement::ColumnInt(int col) const {
194 return sqlite3_column_int(ref_->stmt(), col);
197 int64 Statement::ColumnInt64(int col) const {
201 return sqlite3_column_int64(ref_->stmt(), col);
204 double Statement::ColumnDouble(int col) const {
208 return sqlite3_column_double(ref_->stmt(), col);
211 std::string Statement::ColumnString(int col) const {
216 sqlite3_column_text(ref_->stmt(), col));
217 int len = sqlite3_column_bytes(ref_->stmt(), col);
225 string16 Statement::ColumnString16(int col) const {
229 std::string s = ColumnString(col);
233 int Statement::ColumnByteLength(int col) const {
237 return sqlite3_column_bytes(ref_->stmt(), col);
240 const void* Statement::ColumnBlob(int col) const {
244 return sqlite3_column_blob(ref_->stmt(), col);
247 bool Statement::ColumnBlobAsString(int col, std::string* blob) {
251 const void* p = ColumnBlob(col);
252 size_t len = ColumnByteLength(col);
261 bool Statement::ColumnBlobAsString16(int col, string16* val) const {
265 const void* data = ColumnBlob(col);
266 size_t len = ColumnByteLength(col) / sizeof(char16);
274 bool Statement::ColumnBlobAsVector(int col, std::vector<char>* val) const {
280 const void* data = sqlite3_column_blob(ref_->stmt(), col);
281 int len = sqlite3_column_bytes(ref_->stmt(), col);
290 int col,
292 return ColumnBlobAsVector(col, reinterpret_cast< std::vector<char>* >(val));