-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathServer.hpp
35 lines (29 loc) · 935 Bytes
/
Server.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
#include <memory>
#include "Database.hpp"
#include "DataBaseConnection.hpp"
namespace CCC {
class Server {
private:
struct {
std::shared_ptr<DataBaseConnection> connection;
} data;
public:
typedef DataBaseConnection::CreateDatabaseResult CreateDatabaseResult;
typedef DataBaseConnection::DeleteDatabaseResult DeleteDatabaseResult;
struct Meta {
std::string uuid;
std::string version;
};
Server(std::shared_ptr<DataBaseConnection> connection);
Meta meta();
bool up();
std::vector<Database> databases(const DataBaseConnection::AllDBsOptiions &options = {});
bool databaseExists(const std::string &name);
std::vector<std::string> uuids(const long count = 25l);
std::string uuid();
std::string favicon();
std::optional<DBC::CreateDatabaseResult> createDatabase(const std::string &name);
DeleteDatabaseResult deleteDatabase(const std::string &name);
};
}