Splitting kana set

This commit is contained in:
micialware committed 2026-08-24 01:22:00 +03:00
1 parent 36e5693564
commit c74a0eb311
25 files changed
+389 -354

No files matched your search

+3 -5
View File
@@ -1,9 +1,8 @@
use crate::dictionary::app_data_dir;
use rusqlite::Connection;
use crate::fs::*;
pub fn create_db() {
let path = app_data_dir();
let db_file = path.join("data.db");
let db_file = db_path();
if !db_file.exists() {
std::fs::File::create(&db_file).unwrap();
let connection = Connection::open(&db_file).unwrap();
@@ -51,8 +50,7 @@ fn make_card_stats(conn: &Connection) -> Result<(), rusqlite::Error> {
}
pub fn default_connection() -> Connection {
let path = app_data_dir();
let db_file = path.join("data.db");
let db_file = db_path();
let connection = Connection::open(db_file).unwrap();
connection.execute("PRAGMA foreign_keys = ON;", []).unwrap();
connection