-
Notifications
You must be signed in to change notification settings - Fork 0
/
t_database.h
31 lines (21 loc) · 943 Bytes
/
t_database.h
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
//
// Created by The-Funk on 3/4/18.
//
#ifndef TINSNIP_TDATABASE_H
#define TINSNIP_TDATABASE_H
#include <string>
#include "zdb/zdb.h"
class t_database {
private:
ConnectionPool_T pool; //Connection pool to be used by database manager
bool cleanup; //Corresponds with switch for wiping database on exit
int maxDBSize; //Set maximum size of database
public:
t_database(); //Default constructor
void openDB(std::string dbName); //Open chosen DB on startup
void cleanDB(); //Delete the contents of the working DB on exit
void importDB(); //Import another tinsnip generated SQLite DB on startup
void exportDB(); //Export the contents of the working DB on exit
void closeDB(); //Close the DB connection on exit
};
#endif //TINSNIP_TDATABASE_H