summaryrefslogtreecommitdiffhomepage
path: root/storage.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-01 14:53:05 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-01 14:53:05 +0100
commitcbf1ba38794ab6a323441dcc3b0e5e942f7ab386 (patch)
treec20619b90a1f9ca512aa5e1db9354178e2c2726d /storage.h
parent1f679124bba936e7905c7f4c83186d0c961dca61 (diff)
Added CompiledSQL class, Test coverage
Diffstat (limited to 'storage.h')
-rw-r--r--storage.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/storage.h b/storage.h
index 24f2961..09514c3 100644
--- a/storage.h
+++ b/storage.h
@@ -7,6 +7,7 @@
#include <SQLiteCpp/SQLiteCpp.h>
#include "config.h"
+#include "compiledsql.h"
class Storage
{
@@ -34,18 +35,18 @@ private:
uint64_t m_maxage;
// shared_ptr to work around initialization in constructor
- std::shared_ptr<SQLite::Statement> m_stmt_create;
- std::shared_ptr<SQLite::Statement> m_stmt_getNumberOfDocuments;
- std::shared_ptr<SQLite::Statement> m_stmt_cleanup;
- std::shared_ptr<SQLite::Statement> m_stmt_exists;
- std::shared_ptr<SQLite::Statement> m_stmt_getDocument;
- std::shared_ptr<SQLite::Statement> m_stmt_getRevision;
- std::shared_ptr<SQLite::Statement> m_stmt_getCursorPos;
- std::shared_ptr<SQLite::Statement> m_stmt_getRow;
- std::shared_ptr<SQLite::Statement> m_stmt_setDocument;
- std::shared_ptr<SQLite::Statement> m_stmt_setDocument_new;
- std::shared_ptr<SQLite::Statement> m_stmt_setRevision;
- std::shared_ptr<SQLite::Statement> m_stmt_setCursorPos;
- std::shared_ptr<SQLite::Statement> m_stmt_setRow;
+ CompiledSQL m_stmt_create;
+ CompiledSQL m_stmt_getNumberOfDocuments;
+ CompiledSQL m_stmt_cleanup;
+ CompiledSQL m_stmt_exists;
+ CompiledSQL m_stmt_getDocument;
+ CompiledSQL m_stmt_getRevision;
+ CompiledSQL m_stmt_getCursorPos;
+ CompiledSQL m_stmt_getRow;
+ CompiledSQL m_stmt_setDocument;
+ CompiledSQL m_stmt_setDocument_new;
+ CompiledSQL m_stmt_setRevision;
+ CompiledSQL m_stmt_setCursorPos;
+ CompiledSQL m_stmt_setRow;
};