mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
(refractor) timer and warm up query
This commit is contained in:
1 parent
1b2ee0f691
commit
d6f2b145c3
13 files changed
+294
-47
No files matched your search
@@ -2,7 +2,7 @@ use rusqlite::{Result, params};
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::{
|
||||
CJDicError,
|
||||
CJDicError, Timer,
|
||||
db::{Database, yomitan_writer::normalize_term},
|
||||
};
|
||||
|
||||
@@ -35,6 +35,8 @@ impl YomitanDatabase {
|
||||
limit: u32,
|
||||
offset: u32,
|
||||
) -> Result<Vec<YomitanRow>, CJDicError> {
|
||||
let _timer = Timer::new(format!("search_yomitan: {} {}", q_term, q_reading));
|
||||
|
||||
let and_or = if q_term == q_reading { "OR" } else { "AND" };
|
||||
|
||||
let mut new_t = String::new();
|
||||
|
||||
Reference in new issue
Block a user