init session db class

This commit is contained in:
yggverse 2024-08-11 14:28:14 +03:00
parent 814b25a946
commit 7a04fb8920
6 changed files with 65 additions and 1 deletions

View file

@ -0,0 +1,22 @@
#include "session.hpp"
using namespace lib::database;
Session::Session(
sqlite3 * connection
) {
status = sqlite3_exec(
connection,
R"(
CREATE TABLE IF NOT EXISTS `session`
(
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
`time` INTEGER NOT NULL,
`request` VARCHAR(1024)
)
)",
nullptr,
nullptr,
&error
);
}