diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-01-19 00:21:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-01-22 14:34:25 +0100 |
| commit | 16b3f6c6245acf9689349dbd2af7d4411f861767 (patch) | |
| tree | 14bedff2389bf48c643e1a7d34c82d8265251801 /src/lib/sqlite_statement.h | |
| parent | 9964a038c1a1ed86510439a33b7022807af31d8d (diff) | |
Move sqlite database open/close to a new SQLiteDatabase.
Diffstat (limited to 'src/lib/sqlite_statement.h')
| -rw-r--r-- | src/lib/sqlite_statement.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/sqlite_statement.h b/src/lib/sqlite_statement.h index 3c2246efb..f1131e899 100644 --- a/src/lib/sqlite_statement.h +++ b/src/lib/sqlite_statement.h @@ -24,10 +24,13 @@ #include <string> +class SQLiteDatabase; + + class SQLiteStatement { public: - SQLiteStatement(sqlite3* db, std::string const& statement); + SQLiteStatement(SQLiteDatabase& db, std::string const& statement); ~SQLiteStatement(); SQLiteStatement(SQLiteStatement const&) = delete; @@ -44,7 +47,7 @@ public: int data_count(); private: - sqlite3* _db; + SQLiteDatabase& _db; sqlite3_stmt* _stmt; }; |
