feat: full BaraQL (GROUP BY/JOIN/CTE/aggregates), Raft consensus, sharding — 107 tests
BaraQL parser extended: - GROUP BY + HAVING clauses - JOIN (INNER, LEFT, RIGHT, FULL, CROSS) with ON conditions - CTE (WITH ... AS) with multiple CTEs - Aggregate functions (count, sum, avg, min, max) - CASE/WHEN/THEN/ELSE/END expressions - BETWEEN, IN, LIKE/ILIKE, IS NULL/IS NOT NULL - Dotted path identifiers (table.column) - Subqueries in FROM clause - CREATE TYPE with colon syntax (name: type) - UPDATE SET ... WHERE, DELETE FROM ... WHERE Infrastructure: - Raft consensus: leader election, log replication, RequestVote/AppendEntries - Sharding: hash-based, range-based, consistent hashing, rebalancing - Fixed lexer: = is equality, := is assignment, added : (colon) token - 34 new parser tests (107 total, all passing)
This commit is contained in:
@@ -107,6 +107,7 @@ type
|
||||
tkAssign
|
||||
tkArrow
|
||||
tkDoubleColon
|
||||
tkColon
|
||||
tkDot
|
||||
tkComma
|
||||
tkSemicolon
|
||||
@@ -351,7 +352,7 @@ proc nextToken*(l: var Lexer): Token =
|
||||
discard l.advance()
|
||||
return Token(kind: tkEq, value: "==", line: startLine, col: startCol)
|
||||
discard l.advance()
|
||||
return Token(kind: tkAssign, value: ":=", line: startLine, col: startCol)
|
||||
return Token(kind: tkEq, value: "=", line: startLine, col: startCol)
|
||||
of ':':
|
||||
if l.pos + 1 < l.input.len and l.input[l.pos + 1] == '=':
|
||||
discard l.advance()
|
||||
@@ -362,7 +363,7 @@ proc nextToken*(l: var Lexer): Token =
|
||||
discard l.advance()
|
||||
return Token(kind: tkDoubleColon, value: "::", line: startLine, col: startCol)
|
||||
discard l.advance()
|
||||
return Token(kind: tkInvalid, value: ":", line: startLine, col: startCol)
|
||||
return Token(kind: tkColon, value: ":", line: startLine, col: startCol)
|
||||
of '!':
|
||||
if l.pos + 1 < l.input.len and l.input[l.pos + 1] == '=':
|
||||
discard l.advance()
|
||||
|
||||
Reference in New Issue
Block a user