mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
db sub schema (via Arc)
This commit is contained in:
1 parent
442e309a81
commit
62cb1e5902
7 files changed
+368
-340
No files matched your search
@@ -1,14 +1,13 @@
|
||||
use std::time::Instant;
|
||||
|
||||
use anyhow::Ok;
|
||||
use cjdic2_core::db::search_yomitan;
|
||||
use rusqlite::Connection;
|
||||
use cjdic2_core::db::Database;
|
||||
|
||||
fn main() -> Result<(), anyhow::Error> {
|
||||
let conn = &mut Connection::open("test.db")?;
|
||||
let db = Database::new("test.db")?;
|
||||
|
||||
let start = Instant::now();
|
||||
let rs = search_yomitan(conn, "擦る", "する", 10, 0)?;
|
||||
let rs = db.yomitan().search_yomitan("擦る", "する", 10, 0)?;
|
||||
println!("{:#?}", rs);
|
||||
println!("n={}", rs.len());
|
||||
println!("[{:.2?}]", start.elapsed());
|
||||
|
||||
Reference in new issue
Block a user