mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -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) {
|
fn write_unqualified(&mut self, text: &str) {
|
||||||
// implicitly wrap in %
|
// implicitly wrap in %
|
||||||
let text = format!("%{}%", text);
|
let text = format!("%{}%", text);
|
||||||
|
self.args.push(text.into());
|
||||||
write!(
|
write!(
|
||||||
self.sql,
|
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();
|
.unwrap();
|
||||||
self.args.push(text.clone().into());
|
|
||||||
self.args.push(text.into());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_tag(&mut self, text: &str) {
|
fn write_tag(&mut self, text: &str) {
|
||||||
|
|
Loading…
Reference in a new issue