mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
avoid extra sql binding in unqualified search
This commit is contained in:
parent
1f9e8e388a
commit
b70668d31c
1 changed files with 3 additions and 3 deletions
|
@ -88,13 +88,13 @@ impl SqlWriter<'_, '_> {
|
|||
fn write_unqualified(&mut self, text: &str) {
|
||||
// implicitly wrap in %
|
||||
let text = format!("%{}%", text);
|
||||
self.args.push(text.into());
|
||||
write!(
|
||||
self.sql,
|
||||
"(n.sfld like ? escape '\\' or n.flds like ? escape '\\')"
|
||||
"(n.sfld like ?{n} escape '\\' or n.flds like ?{n} escape '\\')",
|
||||
n = self.args.len(),
|
||||
)
|
||||
.unwrap();
|
||||
self.args.push(text.clone().into());
|
||||
self.args.push(text.into());
|
||||
}
|
||||
|
||||
fn write_tag(&mut self, text: &str) {
|
||||
|
|
Loading…
Reference in a new issue