Small history table change

This commit is contained in:
micialware committed 2026-09-07 10:59:55 +03:00
1 parent f9c4bf9c03
commit bdf71fa0b7
3 files changed
+5 -4

No files matched your search

+2 -1
View File
@@ -98,10 +98,11 @@ pub fn fill_state(state: &mut AppState) {
let connection = state.connection.lock();
let setting = load_settings(&connection);
drop(connection);
state.word_groups.write().start().unwrap();
state.dictionary.write().start().unwrap();
state.decks.write().start().unwrap();
state.history.write().start().unwrap();
state.sync_data = Arc::new(RwLock::new(setting))
}
+2 -2
View File
@@ -13,7 +13,7 @@ pub type HistoryDataLayer = SqliteDbLayer<HistoryNote, HistoryQuerySet>;
pub struct HistoryQuerySet;
impl TableAccessQuerySet<HistoryNote> for HistoryQuerySet {
fn load() -> &'static str {
"SELECT rowid, set_id, state_id, timestamp, answer, before, after, fsrs FROM history"
"SELECT rowid, deck_id, word_id, timestamp, answer, before, after, fsrs FROM history"
}
fn save() -> &'static str {
@@ -21,7 +21,7 @@ impl TableAccessQuerySet<HistoryNote> for HistoryQuerySet {
}
fn add() -> &'static str {
"INSERT INTO history (set_id, state_id, timestamp, answer, before, after, fsrs) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7)"
"INSERT INTO history (deck_id, state_id, timestamp, answer, before, after, fsrs) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7)"
}
fn name() -> &'static str {