Parse SQL at the speed of Go
Production-ready SQL parsing with zero-copy tokenization, object pooling, and multi-dialect support
- 3.14M ops/sec (simple SELECT, parse stage, Apple M4, Go 1.27)
- 8 dialects
- 30 lint rules
- 3,100+ tests
SELECT u.name, u.email, COUNT(o.id) AS order_count, SUM(o.total) AS lifetime_value
FROM users u
LEFT JOIN orders o ON o.user_id = u.id
WHERE u.created_at > '2024-01-01'
GROUP BY u.name, u.email
HAVING COUNT(o.id) > 5
ORDER BY lifetime_value DESC
LIMIT 20;Built for production
- 120GitHub stars
- 3,100+Go test functions, race-detector clean in CI
- ~0.32 µsto parse a simple SELECT (parse stage, Apple M4, Go 1.27)
- 8SQL dialects, one parser
Performance That Speaks for Itself
parses/sec, simple SELECT (parse stage)
latency, simple SELECT (parse stage)
parses/sec, complex query (parse stage)
latency, complex query (parse stage)
Parse stage only (not tokenize or end-to-end), Apple M4, Go 1.27. Source: BenchmarkPerformanceBaseline, median of 10 runs, re-measured 2026-10-13.
Reproduce
go test -run='^$' -bench=BenchmarkPerformanceBaseline -benchmem -count=10 ./pkg/sql/parser/Everything you need to work with SQL in Go
Multi-Dialect
PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle, Snowflake, ClickHouse.
Thread-Safe
Race-detector clean in CI.
Zero-Copy
Direct byte slice operations. No unnecessary allocations.
Object Pooling
sync.Pool recycling for ASTs, tokenizers, expressions.
Security Scanner
SQL injection detection with severity classification.
MCP Server
7 SQL tools for Claude, Cursor, and any MCP client.
8 SQL Dialects, One Parser
From PostgreSQL to ClickHouse, selected with a single dialect string
Simple, Powerful API
Use it everywhere
The same parser powers your Go code, your AI assistant and your editor.
AI assistants
Connect 7 SQL tools to Claude, Cursor or any MCP client. No installation, no API key.
- parse_sql
- format_sql
- validate_sql
- lint_sql
- analyze_sql
- detect_injection
- list_dialects
Editors
Real-time validation, formatting and linting as you type, across all 8 dialects, through the built-in language server (gosqlx lsp).