Parkmanne/headers/old/data.h
2019-07-23 12:34:06 -03:00

22 lines
570 B
C++

#ifndef DATA_H
#define DATA_H
#pragma once
#include "../thirdparty/SQLiteCpp/include/SQLiteCpp/SQLiteCpp.h"
#include "encrypt.h"
namespace data {
/*
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,
because multiple cpp files import this header.
TODO: remove this namespace, we didn't add more functions here like originally planned.
*/
SQLite::Database start_db();
static SQLite::Database db = start_db();
} // namespace data
#endif