Fixes for sqlite data layer
This commit is contained in:
1 parent
7f9aa11d6e
commit
242b56fc21
9 files changed
+73
-67
No files matched your search
@@ -21,13 +21,16 @@ impl TableAccessQuerySet<HistoryNote> for HistoryQuerySet {
|
||||
}
|
||||
|
||||
fn add() -> &'static str {
|
||||
"INSERT INTO history (deck_id, state_id, timestamp, answer, before, after, fsrs) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7) RETURNING rowid"
|
||||
"INSERT INTO history (deck_id, state_id, timestamp, answer, before, after, fsrs) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7)"
|
||||
}
|
||||
|
||||
fn name() -> &'static str {
|
||||
"history"
|
||||
}
|
||||
|
||||
fn id_field() -> &'static str {
|
||||
"rowid"
|
||||
}
|
||||
fn from_sql(row: &Row) -> Result<HistoryNote, Error> {
|
||||
Ok(HistoryNote {
|
||||
id: row.get(0)?,
|
||||
|
||||
Reference in new issue
Block a user