almost all internals done after i fix segfault

This commit is contained in:
MassiveAtoms
2019-07-01 14:23:15 -03:00
parent 450ffc9588
commit 5fa84e866f
10 changed files with 127 additions and 96 deletions

View File

@ -2,19 +2,18 @@
namespace data {
SQLite::Database
start_db() {
SQLite::Database start_db() {
SQLite::Database db("test.db3",
SQLite::OPEN_READWRITE | SQLite::OPEN_CREATE);
while (sodium_init()< 0){
while (sodium_init() < 0) {
std::cout << "SODIUM NOT WORKING";
}
db.exec(
"create table if not exists Customer (id integer primary key, name "
"text, card_code varchar(20), verhicle int)");
"text, password text, verhicle int)");
db.exec(
"create table if not exists Park_spot (id integer primary key, taken "
"boolean, customer_id int)");
"int, customer_id int)");
db.exec(
"create table if not exists Park_time (id integer primary key, "
"customer_id int, spot_id int, start int, end int, duration int)");