diff --git a/server/src/db/_init_sql.cpp b/server/src/db/_init_sql.cpp index 5db77c2..7ab01f5 100644 --- a/server/src/db/_init_sql.cpp +++ b/server/src/db/_init_sql.cpp @@ -1,7 +1,8 @@ #include const char* _mem_db_sql = - "CREATE TABLE "; + "CREATE TABLE SERVER_LIST ( " + ");"; const std::vector _hard_db_sql = { /** START MIGRATION 0 **/ diff --git a/server/src/db/database.hpp b/server/src/db/database.hpp index 01447f9..87bc75b 100644 --- a/server/src/db/database.hpp +++ b/server/src/db/database.hpp @@ -3,6 +3,7 @@ #include "sqlite/sqlite3.h" #include +#include namespace sosc { namespace db { @@ -15,14 +16,15 @@ private: class Query { public: - template - static T ScalarOnce(); - static void NonQueryOnce(); - static ResultSet Once(); - + Query(); + Query(const std::string& query); + void SetQuery(const std::string& query); + void Reset(); + void Close(); private: - + std::string query; + bool open; }; // THE FOLLOWING ARE NOT THREAD SAFE !!