feat: production polish — recursive CTE, UNION/INTERSECT/EXCEPT, DROP INDEX, JSON path, FTS SQL, covering index, SCRAM auth

- Recursive CTE execution (WITH RECURSIVE + UNION ALL, work-table loop)
- UNION / INTERSECT / EXCEPT parser + executor (nkSetOp)
- DROP INDEX parser + executor
- VIEW DDL persistence via AST-to-SQL serializer
- JSON path operators -> and ->> (lexer, parser, IR, executor)
- FTS SQL wiring WHERE col @@ 'query' (case-insensitive term match)
- Multi-column index range scans (prefix equality + range on last col)
- Covering index optimization (skip LSM read when index covers SELECT)
- SCRAM-SHA-256 authentication (password-based validation)
- 279 tests, 0 failures
This commit is contained in:
2026-05-07 13:00:36 +03:00
parent 7faae09ad3
commit 5deb38feb2
8 changed files with 548 additions and 41 deletions
+21
View File
@@ -53,6 +53,7 @@ type
# Expressions
nkBinOp
nkUnaryOp
nkJsonPath # column->'key' or column->>'key'
nkFuncCall
nkTypeCast
nkPath
@@ -87,6 +88,9 @@ type
nkVectorSimilar
nkVectorNearest
# Set operations
nkSetOp
# Join
nkJoin
@@ -124,6 +128,9 @@ type
bkCoalesce = "??"
bkAssign = ":="
bkArrow = "=>"
bkJsonPath = "->"
bkJsonPathText = "->>"
bkFtsMatch = "@@"
UnaryOpKind* = enum
ukNeg = "-"
@@ -138,6 +145,11 @@ type
jkFull
jkCross
SetOpKind* = enum
sdkUnion
sdkIntersect
sdkExcept
SortDir* = enum
sdAsc
sdDesc
@@ -318,6 +330,10 @@ type
of nkUnaryOp:
unOp*: UnaryOpKind
unOperand*: Node
of nkJsonPath:
jpLeft*: Node
jpKey*: string
jpAsText*: bool # true for ->>, false for ->
of nkFuncCall:
funcName*: string
funcArgs*: seq[Node]
@@ -412,6 +428,11 @@ type
joinTarget*: Node
joinOn*: Node
joinAlias*: string
of nkSetOp:
setOpKind*: SetOpKind
setOpAll*: bool
setOpLeft*: Node
setOpRight*: Node
of nkStar:
discard
of nkPlaceholder: