From de57bc38217c09a0ae4a143f631896652368ecc3 Mon Sep 17 00:00:00 2001 From: Dark1-dev Date: Wed, 1 Mar 2023 21:32:53 +0600 Subject: Add files via upload --- src/Database/databaseinterface.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/Database/databaseinterface.h (limited to 'src/Database/databaseinterface.h') diff --git a/src/Database/databaseinterface.h b/src/Database/databaseinterface.h new file mode 100644 index 0000000..f80c93a --- /dev/null +++ b/src/Database/databaseinterface.h @@ -0,0 +1,24 @@ +#ifndef DATABASEINTERFACE_H +#define DATABASEINTERFACE_H + +#include +#include +#include +#include +#include "Core/version.h" +#include "Logger/logprimitive.h" + +// database file path (following README structure) +const QString _sqlitePath = "../data/masterserver.db"; + +// init and close +bool initDatabase(const QString applicationPath); +void closeDatabase(); + +// report execution errors (terminal/display only) +bool reportQuery(const QSqlQuery &q); // always returns false! + +// generate tables in first run +bool createTables(); + +#endif // DATABASEINTERFACE_H -- cgit v1.2.3