Commit 31ad3d0
feat: add T-SQL parser to monorepo (#25)
Add ANTLR4-based T-SQL (Transact-SQL) parser from tsql-parser repository into the parser monorepo.
Changes:
- Add tsql/ directory with grammar files (TSqlLexer.g4, TSqlParser.g4)
- Add Makefile with build and test targets following the pattern of other parsers
- Include 143 SQL test examples covering comprehensive T-SQL features
- Update package name and import paths to github.com/bytebase/parser/tsql
- Add tsql to CI workflow to run tests automatically
- Include helper files (keyword_map.go, tsql_base_lexer.go) for lexer functionality
- All test cases passing
Test coverage includes:
- DDL statements (CREATE, ALTER, DROP for databases, tables, views, indexes, etc.)
- DML statements (SELECT, INSERT, UPDATE, DELETE, MERGE)
- Stored procedures and functions
- Control flow statements
- Built-in functions (date, string, math, cryptographic, JSON, etc.)
- T-SQL specific features (DBCC, hints, transactions, triggers, etc.)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <[email protected]>1 parent 2b2fa56 commit 31ad3d0
File tree
156 files changed
+291032
-1
lines changed- .github/workflows
- tsql
- examples
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
156 files changed
+291032
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
Large diffs are not rendered by default.
0 commit comments