mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
fix for 0.1.1 commit create schema
This commit is contained in:
1 parent
8ee2fe950f
commit
54f3b699a9
3 files changed
+7
-7
No files matched your search
@@ -25,6 +25,7 @@ impl<'a> SearchDatabase<'a> {
|
||||
pub fn create_schema(&mut self) -> Result<(), CJDicError> {
|
||||
let tx = self.conn.transaction()?;
|
||||
SearchDatabase::create_schema_tx(&tx)?;
|
||||
tx.commit()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -594,7 +594,7 @@ impl YomitanWriter {
|
||||
|
||||
steps += entries.len();
|
||||
progress_callback(YomitanProgress {
|
||||
message: format!("Reading term banks"),
|
||||
message: format!("- Reading term banks"),
|
||||
current: bank_i,
|
||||
total: n_bank,
|
||||
steps,
|
||||
@@ -698,7 +698,7 @@ impl YomitanWriter {
|
||||
|
||||
steps += 1;
|
||||
progress_callback(YomitanProgress {
|
||||
message: format!("Reading term meta banks"),
|
||||
message: format!("- Reading term meta banks"),
|
||||
current: 0,
|
||||
total: 0,
|
||||
steps,
|
||||
@@ -741,7 +741,7 @@ impl YomitanWriter {
|
||||
|
||||
steps += 1;
|
||||
progress_callback(YomitanProgress {
|
||||
message: format!("Reading tag banks"),
|
||||
message: format!("- Reading tag banks"),
|
||||
current: 0,
|
||||
total: 0,
|
||||
steps,
|
||||
@@ -821,6 +821,9 @@ impl YomitanWriter {
|
||||
pub fn check_search_db(&mut self) -> Result<bool, CJDicError> {
|
||||
self.ensure_db_attached(DbChild::Search)?;
|
||||
|
||||
let mut search_db = SearchDatabase::new(&mut self.conn);
|
||||
search_db.create_schema()?;
|
||||
|
||||
let is_filled = self.conn.query_row(
|
||||
"
|
||||
SELECT
|
||||
|
||||
@@ -25,8 +25,6 @@ pub fn run() {
|
||||
let vibrato_dic_dir = cache_dir.join("vibrato");
|
||||
create_dir_all(&vibrato_dic_dir)?;
|
||||
|
||||
println!("{:?}", vibrato_dic_dir);
|
||||
|
||||
let vibrato_dic_path = vibrato_dic_dir.join("system.dic");
|
||||
if !vibrato_dic_path.exists() {
|
||||
let zst_path = app.path().resolve(
|
||||
@@ -42,8 +40,6 @@ pub fn run() {
|
||||
std::io::copy(&mut decoder, &mut out)?;
|
||||
}
|
||||
|
||||
println!("{:?}", vibrato_dic_path);
|
||||
|
||||
// db_path is at config_dir;
|
||||
let service = AppService::new(&config_dir, &vibrato_dic_path)?;
|
||||
app.manage(service);
|
||||
|
||||
Reference in new issue
Block a user