From af1c4ee4d74ff7afc997372802d851d11daad418 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 30 Dec 2022 15:07:39 +0100 Subject: Added tests, added sqlite-backed storage (WIP!) --- storage.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 storage.cpp (limited to 'storage.cpp') diff --git a/storage.cpp b/storage.cpp new file mode 100644 index 0000000..9dc7615 --- /dev/null +++ b/storage.cpp @@ -0,0 +1,17 @@ +#include "storage.h" + +#include "config.h" + +#include + +Storage::Storage(const Config& config): m_config(config) +{ + SQLite::Database db(m_config.getDataPath() + "/whiteboard.db3", SQLite::OPEN_READWRITE|SQLite::OPEN_CREATE); + + db.exec("CREATE TABLE IF NOT EXISTS documents (id INTEGER PRIMARY KEY, value TEXT)"); +} + +std::string Storage::getDocument() +{ + return ""; +} -- cgit v1.2.3