From b0c9c2f33b418be119ba4da7a731c5174e818b25 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 1 May 2021 21:54:34 +0200 Subject: [PATCH] Update the engine and re-enable sqlite database creation. --- HEADS | 2 +- main.cpp | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/HEADS b/HEADS index f613214..67fe000 100644 --- a/HEADS +++ b/HEADS @@ -1 +1 @@ -{"engine": {"master": "06cd3e0f6b6081434af6bd9fcf154553a45941c6"}} \ No newline at end of file +{"engine": {"master": "c7ae476853118da5b9b13e35896935dd8d78021c"}} \ No newline at end of file diff --git a/main.cpp b/main.cpp index 4e05c9f..78f7ebf 100644 --- a/main.cpp +++ b/main.cpp @@ -20,12 +20,12 @@ void create_databases() { - Settings *settings = Settings::get_singleton(); + //Settings *settings = Settings::get_singleton(); - if (!settings) { - printf("create_databases: Settings singleton is null!"); - return; - } + //if (!settings) { + // printf("create_databases: Settings singleton is null!"); + // return; + //} /* rapidjson::Value dbs = settings->settings["databases"]; @@ -36,12 +36,15 @@ void create_databases() { } */ - //DatabaseManager *dbm = DatabaseManager::get_singleton(); + DatabaseManager *dbm = DatabaseManager::get_singleton(); //uint32_t index = dbm->create_database("mysql"); //Database *db = dbm->databases[0]; - //db->_builder_creation_func = MysqlQueryBuilder::create; //db->connect(""); + + uint32_t index = dbm->create_database("sqlite"); + Database *db = dbm->databases[index]; + db->connect("database.sqlite"); } int main(int argc, char **argv) {