Skip to content

Commit 2cbf54c

Browse files
ajitpratap0Ajit Pratap Singhclaude
authored
feat: implement BETWEEN, IN, LIKE, IS NULL operators in WHERE clause (#117)
* feat: implement BETWEEN, IN, LIKE, IS NULL operators in WHERE clause - Add BETWEEN/NOT BETWEEN expression parsing with AND keyword handling - Add IN/NOT IN expression parsing with parenthesized value lists - Add LIKE/NOT LIKE/ILIKE pattern matching operators - Add IS NULL/IS NOT NULL postfix operators - Handle NOT prefix properly for negated operators - Update parser_coverage_test.go expectations (5 tests now pass) - Add comprehensive operators_test.go with 14 test cases SQL-99 compliance improvements for comparison predicates. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: correct NOT token handling with look-ahead parsing Address PR review comment about NOT token handling breaking valid SQL. Changes: - Add peekToken() helper for look-ahead without advancing position - Fix parseComparisonExpression() to only consume NOT when followed by BETWEEN, LIKE, ILIKE, or IN operators - Add NOT case in parsePrimaryExpression() for standalone boolean negation (e.g., WHERE NOT active) This properly handles all NOT use cases: - NOT LIKE: WHERE name NOT LIKE '%Admin%' - NOT BETWEEN: WHERE price NOT BETWEEN 10 AND 100 - NOT IN: WHERE status NOT IN ('cancelled', 'deleted') - Boolean negation: WHERE NOT active AND name LIKE '%' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Ajit Pratap Singh <ajitpratapsingh@Ajits-Mac-mini.local> Co-authored-by: Claude <noreply@anthropic.com>
1 parent ca3f309 commit 2cbf54c

3 files changed

Lines changed: 663 additions & 5 deletions

File tree

0 commit comments

Comments
 (0)