kgg-dec/src/infra/infra.h

27 lines
489 B
C
Raw Normal View History

2024-10-17 00:50:14 +00:00
#pragma once
#include <filesystem>
#include <unordered_map>
#include "sqlite_base.h"
namespace Infra {
typedef std::unordered_map<std::string, std::string> kgm_ekey_db_t;
extern bool g_init_sqlite_ok;
class SQLite {
public:
explicit SQLite(const std::filesystem::path& db_path);
~SQLite();
[[nodiscard]] bool is_ok() const { return ok_; }
kgm_ekey_db_t dump_ekey(int& error);
private:
bool ok_ = false;
sqlite3* db_{nullptr};
};
} // namespace Infra