feat: Phase 0 — pipeline integration, DDL parser, SQL executor

- Rewrote PLAN.md with 6-phase production roadmap
- Added 15 DDL/txn lexer keywords (primary, key, foreign, references, etc.)
- Added AST nodes: CreateTable, DropTable, AlterTable, BeginTxn, CommitTxn, RollbackTxn, ExplainStmt, ColumnDef
- Completed INSERT parser: VALUES, column list, RETURNING, ON CONFLICT
- Added CREATE TABLE/DROP TABLE/ALTER TABLE parsers with constraints (PK, FK, UNIQUE, NOT NULL, CHECK, DEFAULT)
- Added UPDATE/DELETE RETURNING support
- Added BEGIN, COMMIT, ROLLBACK, EXPLAIN parsers
- New query/executor.nim: AST->IR lowering + plan execution against LSM-Tree
- Wired server to executor pipeline (replaced regex-based KV INSERT)
- All 216 existing tests pass
This commit is contained in:
2026-05-06 11:10:50 +03:00
parent 096c8347cf
commit ca5e04b96e
7 changed files with 997 additions and 262 deletions
+30
View File
@@ -75,6 +75,21 @@ type
tkLike
tkILike
tkReturning
tkPrimary
tkKey
tkForeign
tkReferences
tkCascade
tkUnique
tkCheck
tkDefault
tkAdd
tkColumn
tkRename
tkBegin
tkCommit
tkRollback
tkExplain
tkCount
tkSum
tkAvg
@@ -203,6 +218,21 @@ const keywords*: Table[string, TokenKind] = {
"like": tkLike,
"ilike": tkILike,
"returning": tkReturning,
"primary": tkPrimary,
"key": tkKey,
"foreign": tkForeign,
"references": tkReferences,
"cascade": tkCascade,
"unique": tkUnique,
"check": tkCheck,
"default": tkDefault,
"add": tkAdd,
"column": tkColumn,
"rename": tkRename,
"begin": tkBegin,
"commit": tkCommit,
"rollback": tkRollback,
"explain": tkExplain,
"count": tkCount,
"sum": tkSum,
"avg": tkAvg,