Started work on database handling.
This commit is contained in:
36
include/ehs/db/Database.h
Normal file
36
include/ehs/db/Database.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include "ehs/Array.h"
|
||||
#include "DbTable.h"
|
||||
|
||||
namespace ehs
|
||||
{
|
||||
class Database
|
||||
{
|
||||
private:
|
||||
UInt_64 hashId;
|
||||
Str_8 id;
|
||||
Array<DbTable> tables;
|
||||
|
||||
public:
|
||||
Database();
|
||||
|
||||
Database(const Str_8& filePath);
|
||||
|
||||
UInt_64 GetHashId() const;
|
||||
|
||||
Str_8 GetId() const;
|
||||
|
||||
bool HasTable(UInt_64 hashId) const;
|
||||
|
||||
bool HasTable(Str_8& id) const;
|
||||
|
||||
bool CreateTable(Str_8 id);
|
||||
|
||||
DbTable* GetTable(UInt_64 hashId) const;
|
||||
|
||||
DbTable* GetTable(Str_8& id) const;
|
||||
|
||||
void Save();
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user