aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/query/parser.go
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2025-08-10 04:04:41 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2025-08-10 04:04:41 -0400
commit92de2b63b6bd0642b92e7ca1c6110bab7f3a2e6b (patch)
treee32f3759413e992fa2fcd01c7f254c17d4bf8eed /pkg/query/parser.go
parent5d0b36cf87ee94c690d11c0beab48f4dadc6fc52 (diff)
Change approximate statmenets to use sqlite MATCH operator
Diffstat (limited to 'pkg/query/parser.go')
-rw-r--r--pkg/query/parser.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/query/parser.go b/pkg/query/parser.go
index 3406bc6..019deac 100644
--- a/pkg/query/parser.go
+++ b/pkg/query/parser.go
@@ -527,7 +527,11 @@ func Parse(tokens []Token) (*Clause, error) {
}
}
- clause.Statements[len(clause.Statements)-1].Value = StringValue{token.Value}
+ if prevToken.Type == TOK_OP_AP {
+ clause.Statements[len(clause.Statements)-1].Value = StringValue{"\"" + token.Value + "\""}
+ } else {
+ clause.Statements[len(clause.Statements)-1].Value = StringValue{token.Value}
+ }
case TOK_VAL_DATETIME:
if !prevToken.Type.isDateOperation() {
return nil, &TokenError{