aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/query/compiler.go
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2025-11-21 20:50:42 -0500
committerJP Appel <jeanpierre.appel01@gmail.com>2025-11-21 20:50:42 -0500
commit1aad60b49a32b6bced95a251f266799c031ca83e (patch)
tree4b156c7f6df11a164a31a5615d30f9cd6f07c44f /pkg/query/compiler.go
parent7383ea149c9444c297e21f21294fd41e67f9c9ff (diff)
Update documentation, comments, and tidy codebase
Diffstat (limited to 'pkg/query/compiler.go')
-rw-r--r--pkg/query/compiler.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/query/compiler.go b/pkg/query/compiler.go
index 7d24b10..2272933 100644
--- a/pkg/query/compiler.go
+++ b/pkg/query/compiler.go
@@ -103,6 +103,13 @@ func (s Statements) buildCompile(b *strings.Builder, delim string) ([]any, error
}
}
+ // NOTE: cases
+ // cat op
+ // any re
+ // .isOrd ap
+ // .isSet !ap
+ // .isSet ap
+ // any any
if op == OP_RE {
idx := 0
for _, stmt := range opStmts {
@@ -197,6 +204,8 @@ func (s Statements) buildCompile(b *strings.Builder, delim string) ([]any, error
}
for _, stmt := range opStmts {
if stmt.Negated {
+ // FIXME: doesn't evaluate correctly for when using MATCH operator in SQL
+ // a potential fix for negated statements is using an EXCEPT-like subquery
b.WriteString("NOT ")
}
b.WriteString(catStr)
@@ -278,7 +287,7 @@ func (c Clause) buildCompile(b *strings.Builder) ([]any, error) {
}
if !isRoot {
- b.WriteString(") ")
+ b.WriteString(")")
}
return args, nil