Lines Matching refs:sql

92   static DbStatement Prepare(DbHandle db, const std::string& sql, Args&&... args) {  in Prepare()  argument
93 return Prepare(db, sql.c_str(), std::forward<Args>(args)...); in Prepare()
97 static DbStatement Prepare(DbHandle db, const char* sql, Args&&... args) { in Prepare() argument
99 DCHECK(sql != nullptr); in Prepare()
104 int rc = sqlite3_prepare_v2(db.get(), sql, -1, /*out*/&stmt, nullptr); in Prepare()
107 DCHECK(db_stmt.CheckOk(rc)) << sql; in Prepare()
301 static std::optional<int> Insert(DbHandle db, const std::string& sql, Args&&... args) { in Insert() argument
305 DbStatement stmt = DbStatement::Prepare(db, sql, std::forward<Args>(args)...); in Insert()
318 static bool Delete(DbHandle db, const std::string& sql, Args&&... args) { in Delete() argument
319 return ExecuteOnce(db, sql, std::forward<Args>(args)...); in Delete()
323 static bool Update(DbHandle db, const std::string& sql, Args&&... args) { in Update() argument
324 return ExecuteOnce(db, sql, std::forward<Args>(args)...); in Update()
328 static bool ExecuteOnce(DbHandle db, const std::string& sql, Args&&... args) { in ExecuteOnce() argument
331 DbStatement stmt = DbStatement::Prepare(db, sql, std::forward<Args>(args)...); in ExecuteOnce()
641 const char* sql = "INSERT INTO packages (name, version) VALUES (?1, ?2);"; in Insert() local
644 DbQueryBuilder::Insert(db, sql, name, version); in Insert()
658 const char* sql = "DELETE FROM packages WHERE id = ?"; in Delete() local
660 return DbQueryBuilder::Delete(db(), sql, id); in Delete()
732 const char* sql = "INSERT INTO activities (name, package_id) VALUES (?1, ?2);"; in Insert() local
735 DbQueryBuilder::Insert(db, sql, name, package_id); in Insert()
866 const char* sql = "INSERT INTO app_launch_histories (activity_id, temperature, trace_enabled, " in Insert() local
873 sql, in Insert()
904 const char* sql = "UPDATE app_launch_histories " in UpdateReportFullyDrawn() local
908 bool result = DbQueryBuilder::Update(db, sql, report_fully_drawn_ns, history_id); in UpdateReportFullyDrawn()
972 const char* sql = in SelectByVersionedComponentName() local
982 sql, in SelectByVersionedComponentName()
1000 const char* sql = in SelectByHistoryId() local
1006 DbStatement stmt = DbStatement::Prepare(db, sql, history_id); in SelectByHistoryId()
1019 const char* sql = "INSERT INTO raw_traces (history_id, file_path) VALUES (?1, ?2);"; in Insert() local
1022 DbQueryBuilder::Insert(db, sql, history_id, file_path); in Insert()
1036 const char* sql = "DELETE FROM raw_traces WHERE id = ?"; in Delete() local
1038 return DbQueryBuilder::Delete(db(), sql, id); in Delete()
1063 const char* sql = in SelectByVersionedComponentName() local
1071 sql, in SelectByVersionedComponentName()
1105 const char* sql = "INSERT INTO prefetch_files (activity_id, file_path) VALUES (?1, ?2);"; in Insert() local
1108 DbQueryBuilder::Insert(db, sql, activity_id, file_path); in Insert()
1122 const char* sql = "DELETE FROM prefetch_files WHERE id = ?"; in Delete() local
1124 return DbQueryBuilder::Delete(db(), sql, id); in Delete()