Commit 631265e
committed
Add parser unit tests (81 tests) and fix IF NOT EXISTS parsing
- Created tests/parser_tests.cpp with comprehensive coverage of:
- SELECT with all clauses (WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, OFFSET, JOINs)
- CREATE TABLE/INDEX, INSERT, UPDATE, DELETE, DROP
- Transaction statements (BEGIN, COMMIT, ROLLBACK)
- Expression parsing (binary, unary, IN, IS NULL, functions)
- Error handling and edge cases
- Fixed parse_create_table() to handle IF NOT EXISTS in correct order
(was checking for NOT before IF, now correctly checks IF before NOT)
- Note: PRIMARY KEY not supported by lexer (missing PRIMARY/KEY keywords)1 parent 36b2833 commit 631265e
3 files changed
Lines changed: 845 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
| |||
0 commit comments