SuperAPI AI Directory

GoSQLX

SQL validation, formatting, parsing, linting, security scanning and metadata extraction across multiple SQL dialects.

Open website

About this tool

Purpose

GoSQLX is a production-grade SQL parsing SDK for the Go language. Its positioning is that of a parser rather than an ORM: it is responsible for lexing and parsing SQL and generating an abstract syntax tree (AST), and how the AST is subsequently used is left to the developer to decide.

Main Capabilities

  • SQL parsing: tokenize, parse, and generate an AST from SQL text.
  • Formatting and static checking (linter).
  • Security scanning.
  • Metadata extraction.
  • Multi-dialect support: PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, Snowflake, ClickHouse.
  • Syntax feature support: CTE, window functions, MERGE, set operations.
  • Performance optimization: zero-copy tokenization, sync.Pool object pool recycling, no allocation on hot paths, no data races.

Performance Data

Benchmarks given in the official materials: parsing a simple SELECT (such as SELECT id, name FROM users) takes about 318 nanoseconds, about 3.1 million parses/second; the title states more than 1.5 million operations/second. This data is for the parsing stage (pre-tokenized input to AST), the test environment is Apple M4, Go 1.27, taking the median of 10 runs. Complex queries take longer; refer to performance_baselines.json. Reproduction command:go test -run ^$ -bench BenchmarkPerformanceBaseline -benchmem -count=10 ./pkg/sql/parser/.

Usage

The integration forms listed in the materials include:

  • Go library (SDK).
  • CLI command-line tool.
  • VS Code extension: built-in binary, zero configuration.
  • GitHub Action.
  • MCP server: provides 7 SQL tools in Claude, Cursor, or any MCP client.
  • WASM online playground (Playground).
  • Python bindings.

Official entry points: gosqlx.dev, as well as the Playground, Docs, MCP Server, and VS Code related pages. Specific installation commands and code examples are not yet given in the provided materials.

Applicable Scenarios

  • Developers who need to parse, validate, or format SQL in Go projects.
  • Engineering workflows that need to perform static checking or security scanning on SQL.
  • Toolchains that need to extract metadata from SQL.
  • Scenarios that need to handle SQL across multiple database dialects.
  • Workflows that integrate SQL capabilities into AI clients via MCP.

Limitations and Notes

  • The materials do not provide specific pricing, price, or feature details beyond licensing; the project uses the Apache License 2.0.
  • The performance data is a benchmark result under a specific environment, and complex queries take longer.
  • The materials do not provide complete installation commands, API usage examples, or platform support details; this content is not yet provided.
  • Contribution process requirements: fork from the main branch and create a branch, write tests (using TDD and requiring no data races), run task check and only submit a PR after it passes.