let fts_results = DBManager.shared.cliptext_virtual.filter(DBManager.shared.cliptext_virtual.match("clip_text: \(searchString)*"))
I also tried without the variable searchString. Just "clip_text: =", escaping the = sign, wrapping it in single quotes, etc.
If I write the query as such: .match("clip_text: \"\(searchString)\"*"))
I no longer get a crash when searching for =, but I don't get a match either, only for words.
bindings: [Optional("clip_text: \"=\"*")]))
How should I go about searching for an exact phrase, containing characters like = and /? Say, the phrase "sum= /"
I use FTS5 and I get a crash when attempting to search with various symbols, for instance, equal symbol (=).
Error message: Thread 1: Fatal error: 'try!' expression unexpectedly raised an error: fts5: syntax error near "=" (code: 1)
Same thing with forward and backslash: Thread 1: Fatal error: 'try!' expression unexpectedly raised an error: fts5: syntax error near "\" (code: 1)
File: Statement.swift
My code:
let fts_results = DBManager.shared.cliptext_virtual.filter(DBManager.shared.cliptext_virtual.match("clip_text: \(searchString)*"))
I also tried without the variable searchString. Just "clip_text: =", escaping the = sign, wrapping it in single quotes, etc.
If I write the query as such:
.match("clip_text: \"\(searchString)\"*"))
I no longer get a crash when searching for=
, but I don't get a match either, only for words.bindings: [Optional("clip_text: \"=\"*")]))
How should I go about searching for an exact phrase, containing characters like = and /? Say, the phrase "sum= /"
SQLite.swift version: 0.11.5