Lines Matching refs:statement
13 #include "app/sql/statement.h"
142 sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
144 if (!statement)
147 statement.BindString(0, segment_name);
148 if (statement.Step())
149 return statement.ColumnInt64(0);
155 sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
157 if (!statement)
160 statement.BindInt64(0, url_id);
161 statement.BindInt64(1, segment_id);
162 return statement.Run();
166 sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
168 if (!statement)
171 statement.BindInt64(0, segment_id);
172 if (statement.Step())
173 return statement.ColumnInt64(0);
179 sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
181 if (!statement)
184 statement.BindString(0, segment_name);
185 statement.BindInt64(1, url_id);
186 if (statement.Run())
196 sql::Statement select(GetDB().GetCachedStatement(SQL_FROM_HERE,
205 sql::Statement update(GetDB().GetCachedStatement(SQL_FROM_HERE,
215 sql::Statement insert(GetDB().GetCachedStatement(SQL_FROM_HERE,
241 sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
245 if (!statement) {
251 statement.BindInt64(0, ts.ToInternalValue());
257 while (statement.Step()) {
258 SegmentID segment_id = statement.ColumnInt64(0);
271 base::Time::FromInternalValue(statement.ColumnInt64(1));
272 int visit_count = statement.ColumnInt(2);
300 sql::Statement statement2(GetDB().GetCachedStatement(SQL_FROM_HERE,
320 sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
322 if (!statement)
325 statement.BindInt64(0, older_than.LocalMidnight().ToInternalValue());
326 if (!statement.Run())
332 sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
334 if (!statement)
337 statement.BindInt(0, index);
338 statement.BindInt64(1, segment_id);
339 if (!statement.Run())
346 sql::Statement select(GetDB().GetCachedStatement(SQL_FROM_HERE,
351 sql::Statement delete_seg(GetDB().GetCachedStatement(SQL_FROM_HERE,
356 sql::Statement delete_usage(GetDB().GetCachedStatement(SQL_FROM_HERE,