feat: initial database creation, loading

fixes for cartographer and automatically add track to album when adding to artist
This commit is contained in:
Joshua Strobl 2024-10-05 00:03:50 +03:00
parent 72bbcaba9e
commit 62c99ee67c
18 changed files with 515 additions and 108 deletions

View file

@ -0,0 +1,21 @@
#pragma once
#include <QSqlDatabase>
class KotoDatabase {
public:
KotoDatabase();
static KotoDatabase& instance();
static KotoDatabase* create() { return &instance(); }
void connect();
void disconnect();
QSqlDatabase getDatabase();
void load();
bool requiredBootstrap();
private:
void bootstrap();
bool shouldBootstrap;
QSqlDatabase db;
};