Lines Matching refs:DbHandle

48 class DbHandle {
51 explicit DbHandle(sqlite3* db) in DbHandle() function
79 ScopedLockDb(DbHandle& handle) : ScopedLockDb(handle.mutex()) { in ScopedLockDb()
92 static DbStatement Prepare(DbHandle db, const std::string& sql, Args&&... args) { in Prepare()
97 static DbStatement Prepare(DbHandle db, const char* sql, Args&&... args) { in Prepare()
113 DbStatement(DbHandle db, sqlite3_stmt* stmt) : db_(db), stmt_(stmt) { in DbStatement()
120 DbHandle db() { in db()
269 other.db_ = DbHandle{nullptr};
290 DbHandle db_;
301 static std::optional<int> Insert(DbHandle db, const std::string& sql, Args&&... args) { in Insert()
318 static bool Delete(DbHandle db, const std::string& sql, Args&&... args) { in Delete()
323 static bool Update(DbHandle db, const std::string& sql, Args&&... args) { in Update()
328 static bool ExecuteOnce(DbHandle db, const std::string& sql, Args&&... args) { in ExecuteOnce()
358 DbHandle db() const { in db()
362 Model(DbHandle db) : db_{db} { in Model()
366 DbHandle db_;
386 SchemaModel schema{DbHandle{db}, location}; in GetOrCreate()
414 SchemaModel schema{DbHandle{db}, location}; in GetOrCreate()
428 static DbHandle GetSingleton() { in GetSingleton()
470 SchemaModel(DbHandle db, std::string location) : Model{db}, location_(location) { in SchemaModel()
474 static std::optional<DbHandle> s_singleton_;
571 PackageModel(DbHandle db) : Model{db} { in PackageModel()
575 static std::optional<PackageModel> SelectById(DbHandle db, int id) { in SelectById()
590 static std::vector<PackageModel> SelectByName(DbHandle db, const char* name) { in SelectByName()
606 static std::optional<PackageModel> SelectByNameAndVersion(DbHandle db, in SelectByNameAndVersion()
623 static std::vector<PackageModel> SelectAll(DbHandle db) { in SelectAll()
638 static std::optional<PackageModel> Insert(DbHandle db, in Insert()
678 ActivityModel(DbHandle db) : Model{db} { in ActivityModel()
682 static std::optional<ActivityModel> SelectById(DbHandle db, int id) { in SelectById()
697 static std::optional<ActivityModel> SelectByNameAndPackageId(DbHandle db, in SelectByNameAndPackageId()
713 static std::vector<ActivityModel> SelectByPackageId(DbHandle db, in SelectByPackageId()
729 static std::optional<ActivityModel> Insert(DbHandle db, in Insert()
751 DbHandle db, in SelectOrInsert()
788 AppLaunchHistoryModel(DbHandle db) : Model{db} { in AppLaunchHistoryModel()
799 static std::optional<AppLaunchHistoryModel> SelectById(DbHandle db, int id) { in SelectById()
829 DbHandle db, in SelectActivityHistoryForCompile()
856 static std::optional<AppLaunchHistoryModel> Insert(DbHandle db, in Insert()
900 static bool UpdateReportFullyDrawn(DbHandle db, in UpdateReportFullyDrawn()
962 RawTraceModel(DbHandle db) : Model{db} { in RawTraceModel()
968 static std::vector<RawTraceModel> SelectByVersionedComponentName(DbHandle db, in SelectByVersionedComponentName()
997 static std::optional<RawTraceModel> SelectByHistoryId(DbHandle db, int history_id) { in SelectByHistoryId()
1016 static std::optional<RawTraceModel> Insert(DbHandle db, in Insert()
1054 PrefetchFileModel(DbHandle db) : Model{db} { in PrefetchFileModel()
1059 DbHandle db, in SelectByVersionedComponentName()
1085 static std::vector<PrefetchFileModel> SelectAll(DbHandle db) { in SelectAll()
1102 static std::optional<PrefetchFileModel> Insert(DbHandle db, in Insert()