mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-08 17:35:18 +00:00
db update schema
This commit is contained in:
1 parent
707c4274d1
commit
442e309a81
5 files changed
+43
-21
No files matched your search
@@ -23,11 +23,8 @@ fn main() -> Result<(), anyhow::Error> {
|
||||
let start = Instant::now();
|
||||
|
||||
println!("zip_file: {:?}", p);
|
||||
println!(
|
||||
"{:?}\n[{:.2?}]",
|
||||
import_bundled_zip_file(conn, p)?,
|
||||
start.elapsed(),
|
||||
);
|
||||
println!("{:?}", import_bundled_zip_file(conn, p, "ja")?,);
|
||||
println!("[{:.2?}]", start.elapsed(),);
|
||||
} else {
|
||||
println!("not zip_file: {:?}", p);
|
||||
}
|
||||
|
||||
@@ -8,8 +8,10 @@ fn main() -> Result<(), anyhow::Error> {
|
||||
let conn = &mut Connection::open("test.db")?;
|
||||
|
||||
let start = Instant::now();
|
||||
let rs = search_yomitan(conn, "食べる", "食べる", 5, 0)?;
|
||||
println!("{:#?}\n[{:.2?}]", rs, start.elapsed());
|
||||
let rs = search_yomitan(conn, "擦る", "する", 10, 0)?;
|
||||
println!("{:#?}", rs);
|
||||
println!("n={}", rs.len());
|
||||
println!("[{:.2?}]", start.elapsed());
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
use std::time::Instant;
|
||||
|
||||
use anyhow::Ok;
|
||||
use cjdic2_core::db::create_schema;
|
||||
use rusqlite::Connection;
|
||||
|
||||
fn main() -> Result<(), anyhow::Error> {
|
||||
let conn = &mut Connection::open("test.db")?;
|
||||
|
||||
let start = Instant::now();
|
||||
create_schema(conn)?;
|
||||
println!("[{:.2?}]", start.elapsed());
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in new issue
Block a user