|
|
@ -1,6 +1,6 @@
|
|
|
|
use rusqlite::{params, Connection, Result};
|
|
|
|
|
|
|
|
use crate::comment::{Comment, CommentSend};
|
|
|
|
use crate::comment::{Comment, CommentSend};
|
|
|
|
use chrono::NaiveDateTime;
|
|
|
|
use chrono::NaiveDateTime;
|
|
|
|
|
|
|
|
use rusqlite::{params, Connection, Result};
|
|
|
|
|
|
|
|
|
|
|
|
pub struct Database {
|
|
|
|
pub struct Database {
|
|
|
|
conn: Connection,
|
|
|
|
conn: Connection,
|
|
|
@ -17,7 +17,7 @@ impl Database {
|
|
|
|
text TEXT NOT NULL,
|
|
|
|
text TEXT NOT NULL,
|
|
|
|
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
|
|
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
|
|
)",
|
|
|
|
)",
|
|
|
|
params![]
|
|
|
|
params![],
|
|
|
|
)?;
|
|
|
|
)?;
|
|
|
|
Ok(Self { conn })
|
|
|
|
Ok(Self { conn })
|
|
|
|
}
|
|
|
|
}
|
|
|
|