Skip to main content
v1.14.0 - Multi-Dialect SQL Parser

Parse SQL at the speed of Go

Production-ready SQL parsing with zero-copy tokenization, object pooling, and multi-dialect support

query.sql
Loading... 0%
{
  "type": "Query",
  "body": {
    "type": "Select",
    "projection": [
      { "type": "CompoundIdentifier", "value": "u.name" },
      { "type": "CompoundIdentifier", "value": "u.email" },
      { "type": "Function", "name": "COUNT", "alias": "order_count" },
      { "type": "Function", "name": "SUM", "alias": "lifetime_value" }
    ],
    "from": { "type": "Join", "join_type": "LEFT" },
    "group_by": ["u.name", "u.email"],
    "order_by": [{ "expr": "lifetime_value", "asc": false }],
    "limit": 20
  }
}

Trusted by Developers

1.2kGitHub Stars
800+Tests Passing
1.38Mops/sec
ZeroRace Conditions
Go 1.26+Minimum Version

Integrates with

ClaudeMCP Server
VS CodeExtension
CursorMCP Server

Performance That Speaks for Itself

1,380,000+

ops/sec

<1µs

latency

85%

SQL-99

8

Dialects

Based on BenchmarkParse, Apple M4, Go 1.26

Built for Production

Multi-Dialect

PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle, Snowflake, ClickHouse.

Thread-Safe

Zero race conditions. 20,000+ concurrent ops tested.

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 — parse them all

PG

PostgreSQL

95%

Excellent
My

MySQL

95%

Excellent
Ma

MariaDB

95%

Excellent
MS

SQL Server

85%

Very Good
Or

Oracle

80%

Good
SL

SQLite

85%

Very Good
SF

Snowflake

100%

87/87 QA

Excellent
CH

ClickHouse

83%

69/83 QA

Good

Simple, Powerful API

main.go
1package main
2 
3import "github.com/ajitpratap0/GoSQLX/pkg/gosqlx"
4 
5func main() {
6 // Parse SQL into an AST
7 ast, err := gosqlx.Parse("SELECT * FROM users WHERE active = true")
8 if err != nil {
9 log.Fatal(err)
10 }
11 fmt.Println(ast.Statements)
12}

AI-Ready SQL Tools

Connect 7 SQL tools to Claude, Cursor, or any MCP client — no installation, no API key.

Terminal
$ claude mcp add --transport http gosqlx https://mcp.gosqlx.dev/mcp
✓ Added gosqlx (7 tools available)
parse_sqlformat_sqlvalidate_sqllint_sqlanalyze_sqldetect_injectionlist_dialects

IDE Integration

Real-time SQL validation, formatting, and linting in VS Code. Catch errors as you type with full multi-dialect support.

Install Extension
query.sql — GoSQLX
1SELECT u.id, u.name, u.email
2FROM users u
3JOIN orders o ON o.user_id = u.id
4WHERE u.active = true
5ORDER BY u.name ASC;
Valid SQL|PostgreSQL
0 issues

Ready to parse SQL at the speed of Go?