#pragma once

#include "SqliteInterface.h"
#include "Database.h"

#include <memory>
#include <filesystem>

using Path = std::filesystem::path;

class DatabaseManager
{
public:
    DatabaseManager();

    ~DatabaseManager();

    static std::unique_ptr<DatabaseManager> Create();

    void openDatabase(const Path& path);

    void run(const std::string& statement);

    void onShutDown();

private:
    DatabasePtr mDatabase;
    SqliteInterfacePtr mDatabaseInterface;
};

using DatabaseManagerPtr = std::unique_ptr<DatabaseManager>;
