2019-06-29 22:59:48 +00:00
|
|
|
#ifndef DATA_H
|
|
|
|
#define DATA_H
|
|
|
|
#pragma once
|
2019-06-26 18:12:23 +00:00
|
|
|
#include "../thirdparty/SQLiteCpp/include/SQLiteCpp/SQLiteCpp.h"
|
2019-06-30 17:49:20 +00:00
|
|
|
#include "encrypt.h"
|
|
|
|
|
2019-06-26 18:12:23 +00:00
|
|
|
namespace data {
|
2019-07-02 00:51:23 +00:00
|
|
|
|
2019-07-02 18:40:37 +00:00
|
|
|
/*
|
|
|
|
start_db is the function that opens the database, and
|
|
|
|
if the necesary tables are not there, creates them.
|
|
|
|
db is the database, and is static to avoid multiple redefinition errors.
|
|
|
|
*/
|
|
|
|
SQLite::Database start_db();
|
2019-06-29 22:59:48 +00:00
|
|
|
static SQLite::Database db = start_db();
|
|
|
|
|
2019-06-30 03:37:18 +00:00
|
|
|
} // namespace data
|
2019-06-29 22:59:48 +00:00
|
|
|
|
|
|
|
#endif
|