From 1aad60b49a32b6bced95a251f266799c031ca83e Mon Sep 17 00:00:00 2001 From: JP Appel Date: Fri, 21 Nov 2025 20:50:42 -0500 Subject: Update documentation, comments, and tidy codebase --- pkg/query/compiler.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pkg/query/compiler.go') 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 -- cgit v1.2.3