From 1116a93290de01cf8cd26feb85573a5caa04ee8d Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Fri, 29 Jan 2021 10:51:20 +0100 Subject: [PATCH] Handle & in firstauthor as incorrect. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index a8eb92a..9d04f96 100644 --- a/src/main.rs +++ b/src/main.rs @@ -108,7 +108,7 @@ fn main() { let mut conn = Connection::open("/mnt/ext1/system/explorer-3/explorer-3.db").unwrap(); let tx = conn.transaction().unwrap(); { - let mut stmt = tx.prepare("SELECT id FROM books_impl WHERE ext LIKE 'epub' AND author LIKE '% %' AND firstauthor NOT LIKE '%\\,%' ESCAPE '\\'").unwrap(); + let mut stmt = tx.prepare("SELECT id FROM books_impl WHERE ext LIKE 'epub' AND author LIKE '% %' AND (firstauthor NOT LIKE '%\\,%' ESCAPE '\\' OR firstauthor LIKE '%&%')").unwrap(); let mut rows = stmt.query(NO_PARAMS).unwrap(); let mut book_ids: Vec = Vec::new(); while let Some(row) = rows.next().unwrap() {