mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
init session db class
This commit is contained in:
parent
814b25a946
commit
7a04fb8920
6 changed files with 65 additions and 1 deletions
22
src/lib/database/session.cpp
Normal file
22
src/lib/database/session.cpp
Normal 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
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue