2022-06-30 13:23:48 +02:00
|
|
|
#include "database_manager.h"
|
|
|
|
|
2022-07-06 12:46:22 +02:00
|
|
|
#include "database.h"
|
|
|
|
|
2022-07-06 23:03:44 +02:00
|
|
|
Ref<Database> DatabaseManager::get_ddb() {
|
|
|
|
return _ddb;
|
|
|
|
}
|
|
|
|
void DatabaseManager::set_ddb(const Ref<Database> &db) {
|
|
|
|
_ddb = db;
|
|
|
|
}
|
|
|
|
|
2022-06-30 13:23:48 +02:00
|
|
|
void DatabaseManager::load() {
|
|
|
|
//go thourgh settings, and create all the defined db backends
|
2022-07-06 12:46:22 +02:00
|
|
|
//add them to ProjectSettings
|
2022-06-30 13:23:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
DatabaseManager *DatabaseManager::get_singleton() {
|
|
|
|
return _instance;
|
|
|
|
}
|
|
|
|
|
|
|
|
DatabaseManager::DatabaseManager() {
|
|
|
|
_instance = this;
|
|
|
|
}
|
|
|
|
|
|
|
|
DatabaseManager::~DatabaseManager() {
|
|
|
|
_instance = nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
DatabaseManager *DatabaseManager::_instance = nullptr;
|