Parkmanne/headers/data.h

22 lines
570 B
C
Raw Normal View History

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"
#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
2019-07-08 20:57:09 +00:00
if the necesary tables are not there, creates them.
2019-07-23 14:17:55 +00:00
db is the database, and is static to avoid multiple redefinition errors,
because multiple cpp files import this header.
TODO: remove this namespace, we didn't add more functions here like originally planned.
2019-07-02 18:40:37 +00:00
*/
SQLite::Database start_db();
2019-06-29 22:59:48 +00:00
static SQLite::Database db = start_db();
} // namespace data
2019-06-29 22:59:48 +00:00
#endif