gosqlx

package module
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

README ΒΆ

GoSQLX

GoSQLX Logo
Parse SQL at the speed of Go

Go Version Release License PRs Welcome

Website VS Code MCP Glama MCP Server Lint Action

Tests Go Report GoDoc Stars OpenSSF Scorecard


🌐 Try the Playground Β Β·Β  πŸ“– Read the Docs Β Β·Β  πŸš€ Get Started Β Β·Β  πŸ“Š Benchmarks


1.38M+ ops/sec <1ΞΌs latency 85% SQL-99 8 dialects 0 race conditions

What is GoSQLX?

GoSQLX is a production-ready SQL parsing SDK for Go. It tokenizes, parses, and generates ASTs from SQL with zero-copy optimizations and intelligent object pooling - handling 1.38M+ operations per second with sub-microsecond latency.

ast, _ := gosqlx.Parse("SELECT u.name, COUNT(*) FROM users u JOIN orders o ON u.id = o.user_id GROUP BY u.name")
// β†’ Full AST with statements, columns, joins, grouping - ready for analysis, transformation, or formatting
Why GoSQLX?
  • Not an ORM - a parser. You get the AST, you decide what to do with it.
  • Not slow - zero-copy tokenization, sync.Pool recycling, no allocations on hot paths.
  • Not limited - PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, Snowflake, ClickHouse. CTEs, window functions, MERGE, set operations.
  • Not just a library - CLI, VS Code extension, GitHub Action, MCP server, WASM playground, Python bindings.

Get Started in 60 Seconds

go get github.com/ajitpratap0/GoSQLX
package main

import (
    "fmt"
    "github.com/ajitpratap0/GoSQLX/pkg/gosqlx"
)

func main() {
    // Parse any SQL dialect
    ast, _ := gosqlx.Parse("SELECT * FROM users WHERE active = true")
    fmt.Printf("%d statement(s)\n", len(ast.Statements))

    // Format messy SQL
    clean, _ := gosqlx.Format("select id,name from users where id=1", gosqlx.DefaultFormatOptions())
    fmt.Println(clean)
    // SELECT
    //   id,
    //   name
    // FROM users
    // WHERE id = 1

    // Catch errors before production
    if err := gosqlx.Validate("SELECT * FROM"); err != nil {
        fmt.Println(err) // β†’ expected table name
    }
}

Install Everywhere

πŸ“¦ Go Library
go get github.com/ajitpratap0/GoSQLX
πŸ–₯️ CLI Tool
go install github.com/ajitpratap0/GoSQLX/cmd/gosqlx@latest
gosqlx validate "SELECT * FROM users"
gosqlx format query.sql
gosqlx lint query.sql
πŸ’» VS Code Extension
code --install-extension ajitpratap0.gosqlx

Bundles the binary - zero setup. Learn more β†’

πŸ€– MCP Server (AI Integration)
claude mcp add --transport http gosqlx \
  https://mcp.gosqlx.dev/mcp

7 SQL tools in Claude, Cursor, or any MCP client. Guide β†’


Features at a Glance

⚑ Parser

Zero-copy tokenizer
Recursive descent parser
Full AST generation
Multi-dialect engine

πŸ›‘οΈ Analysis

SQL injection scanner
10 lint rules (L001–L010)
Query complexity scoring
Metadata extraction

πŸ”§ Tooling

AST-based formatter
Query transforms API
VS Code extension
GitHub Action

🌐 Multi-Dialect

PostgreSQL Β· MySQL Β· MariaDB
SQL Server Β· Oracle
SQLite Β· Snowflake Β· ClickHouse

πŸ€– AI-Ready

MCP server (7 tools)
Public remote endpoint
Streamable HTTP

πŸ§ͺ Battle-Tested

20K+ concurrent ops
Zero race conditions
~85% SQL-99 compliance

Documentation

Resource Description
🌐 gosqlx.dev Website with interactive playground
πŸš€ Getting Started Parse your first SQL in 5 minutes
πŸ“– Usage Guide Comprehensive patterns and examples
πŸ“„ API Reference Complete API documentation
πŸ–₯️ CLI Guide Command-line tool reference
🌍 SQL Compatibility Dialect support matrix
πŸ€– MCP Guide AI assistant integration
πŸ—οΈ Architecture System design deep-dive
πŸ“Š Benchmarks Performance data and methodology
πŸ“ Release Notes What's new in each version

Contributing

GoSQLX is built by contributors like you. Whether it's a bug fix, new feature, documentation improvement, or just a typo - every contribution matters.

git clone https://github.com/ajitpratap0/GoSQLX.git && cd GoSQLX
task check    # fmt β†’ vet β†’ lint β†’ test (with race detection)
  1. Fork & branch from main
  2. Write tests - we use TDD and require race-free code
  3. Run task check - must pass before PR
  4. Open a PR - we review within 24 hours

πŸ“‹ Contributing Guide Β· πŸ“œ Code of Conduct Β· πŸ›οΈ Governance


Who's Using GoSQLX?

GoSQLX is downloaded and cloned by developers worldwide -- 595 unique cloners in just 14 days. If you're using GoSQLX in your project or organization, we'd love to hear about it!

Project / Company Use Case
Your project here Add yourself via PR or tell us in Discussions

Using GoSQLX at work? Building something cool with it? Share your story in GitHub Discussions -- it helps the community grow and motivates continued development.


Community

Got questions? Ideas? Found a bug?

Discussions Issues Blog


License

Apache License 2.0 - see LICENSE for details.


Built with ❀️ by the GoSQLX community

gosqlx.dev Β· Playground Β· Docs Β· MCP Server Β· VS Code


If GoSQLX helps your project, consider giving it a ⭐

Documentation ΒΆ

Overview ΒΆ

Package gosqlx provides a production-ready, high-performance SQL parsing SDK for Go with zero-copy tokenization and comprehensive object pooling. It offers enterprise-grade SQL lexing, parsing, and AST generation with support for multiple SQL dialects and advanced SQL features.

GoSQLX v1.13.0 includes both a powerful Go SDK and a high-performance CLI tool for SQL processing, validated for production deployment with race-free concurrent operation and extensive real-world testing.

Production Status: VALIDATED FOR PRODUCTION DEPLOYMENT (v1.6.0+)

  • Thread Safety: Race-free through comprehensive concurrent testing
  • Performance: 1.38M+ ops/sec sustained, 1.5M+ peak with memory-efficient pooling
  • International: Full Unicode/UTF-8 support for global SQL processing
  • Reliability: 95%+ success rate on real-world SQL queries
  • Standards: Multi-dialect SQL compatibility (PostgreSQL, MySQL, SQL Server, Oracle, SQLite)
  • SQL Compliance: ~80-85% SQL-99 compliance (window functions, CTEs, set operations)
  • Test Coverage: AST package 73.4%, Models package 100%

Core Features:

- Zero-copy tokenization for optimal performance - Object pooling for 60-80% memory reduction - Multi-dialect SQL support (PostgreSQL, MySQL, SQL Server, Oracle, SQLite) - Thread-safe implementation with linear scaling to 128+ cores - Full Unicode/UTF-8 support for international SQL - Performance monitoring and metrics collection - Visitor pattern support for AST traversal - Production-ready CLI tool with 1.38M+ ops/sec performance

Advanced SQL Features:

SQL-99 Core Features (v1.3.0+):

  • Window functions with OVER clause (ROW_NUMBER, RANK, DENSE_RANK, NTILE, LAG, LEAD, FIRST_VALUE, LAST_VALUE)
  • PARTITION BY and ORDER BY window specifications
  • Window frame clauses (ROWS/RANGE with UNBOUNDED/CURRENT ROW/value PRECEDING/FOLLOWING)
  • Common Table Expressions (CTEs) with WITH clause
  • Recursive CTEs with WITH RECURSIVE support
  • Multiple CTEs in single query with proper scoping
  • Set operations: UNION, UNION ALL, EXCEPT, INTERSECT with correct precedence
  • Complete JOIN support (INNER/LEFT/RIGHT/FULL/CROSS/NATURAL with ON/USING)

PostgreSQL Extensions (v1.6.0+):

  • LATERAL JOIN for correlated subqueries in FROM clause
  • JSON/JSONB operators (->/->>/#>/#>>/@>/<@/?/?|/?&/#-)
  • DISTINCT ON for row selection by column values
  • FILTER clause for conditional aggregation (SQL:2003)
  • RETURNING clause for INSERT/UPDATE/DELETE operations
  • ILIKE for case-insensitive pattern matching
  • MATERIALIZED views with REFRESH CONCURRENTLY

Advanced Grouping (v1.5.0+):

  • GROUPING SETS for explicit grouping combinations
  • ROLLUP for hierarchical subtotals
  • CUBE for all possible combinations
  • MERGE statements (SQL:2003 F312)

Expression Operators:

  • BETWEEN with expressions
  • IN with subqueries and value lists
  • LIKE/ILIKE with pattern matching
  • IS NULL/IS NOT NULL
  • NULLS FIRST/LAST ordering (SQL-99 F851)

~80-85% SQL-99 standards compliance

CLI Tool (v1.6.0):

Install the CLI:

go install github.com/ajitpratap0/GoSQLX/cmd/gosqlx@latest

CLI Commands:

gosqlx validate "SELECT * FROM users"              // Ultra-fast validation (1.38M+ ops/sec)
gosqlx format -i query.sql                        // Intelligent formatting (2,600+ files/sec)
gosqlx analyze complex_query.sql                  // Advanced analysis (1M+ queries/sec)
gosqlx parse -f json query.sql                    // AST generation (JSON/YAML output)
gosqlx lsp                                        // Start LSP server for IDE integration
gosqlx lint --config .gosqlx.yml src/**/*.sql     // SQL linting with 10 rules (L001-L010)

Configuration (.gosqlx.yml):

format:
  indent: 2
  uppercase_keywords: true
validation:
  dialect: postgresql
lsp:
  trace_server: messages
server:
  log_level: info

See docs/CONFIGURATION.md for complete configuration reference.

Basic Usage:

import (
    "github.com/ajitpratap0/GoSQLX/pkg/sql/tokenizer"
    "github.com/ajitpratap0/GoSQLX/pkg/sql/parser"
    "github.com/ajitpratap0/GoSQLX/pkg/sql/ast"
)

// Get a tokenizer from the pool
tkz := tokenizer.GetTokenizer()
defer tokenizer.PutTokenizer(tkz)

// Tokenize SQL
tokens, err := tkz.Tokenize([]byte("SELECT * FROM users WHERE id = 1"))
if err != nil {
    log.Fatal(err)
}

// Parse tokens into AST
p := &parser.Parser{}
astObj, err := p.Parse(tokens)
if err != nil {
    log.Fatal(err)
}
defer ast.ReleaseAST(astObj)

Advanced Usage (Window Functions, CTEs, PostgreSQL Extensions):

// Window Functions (SQL-99 F611)
windowSQL := `SELECT name, salary,
    ROW_NUMBER() OVER (PARTITION BY dept ORDER BY salary DESC) as rank,
    LAG(salary, 1) OVER (ORDER BY hire_date) as prev_salary,
    SUM(salary) OVER (ORDER BY hire_date ROWS BETWEEN 2 PRECEDING AND CURRENT ROW) as rolling_sum
FROM employees`

// Common Table Expression (CTE) (SQL-99 F121)
cteSQL := `WITH sales_summary AS (
    SELECT region, SUM(amount) as total
    FROM sales
    GROUP BY region
) SELECT region FROM sales_summary WHERE total > 1000`

// Recursive CTE (SQL-99 F131)
recursiveSQL := `WITH RECURSIVE employee_tree AS (
    SELECT employee_id, manager_id, name FROM employees WHERE manager_id IS NULL
    UNION ALL
    SELECT e.employee_id, e.manager_id, e.name
    FROM employees e JOIN employee_tree et ON e.manager_id = et.employee_id
) SELECT * FROM employee_tree`

// Set Operations (SQL-99 F302)
unionSQL := `SELECT name FROM customers UNION SELECT name FROM suppliers`
exceptSQL := `SELECT product FROM inventory EXCEPT SELECT product FROM discontinued`
intersectSQL := `SELECT customer_id FROM orders INTERSECT SELECT customer_id FROM payments`

// PostgreSQL Extensions (v1.6.0)
lateralSQL := `SELECT u.name, r.order_date FROM users u,
    LATERAL (SELECT * FROM orders WHERE user_id = u.id ORDER BY order_date DESC LIMIT 3) r`

jsonSQL := `SELECT data->>'name' AS name, data->'address'->>'city' AS city FROM users
    WHERE data @> '{"active": true}'`

distinctOnSQL := `SELECT DISTINCT ON (dept_id) dept_id, name, salary
    FROM employees ORDER BY dept_id, salary DESC`

filterSQL := `SELECT COUNT(*) FILTER (WHERE status = 'active') AS active_count,
    SUM(amount) FILTER (WHERE type = 'credit') AS total_credits
FROM transactions`

returningSQL := `INSERT INTO users (name, email) VALUES ('John', 'john@example.com')
    RETURNING id, created_at`

// Advanced Grouping (SQL-99 T431)
groupingSetsSQL := `SELECT region, product, SUM(sales)
    FROM orders GROUP BY GROUPING SETS ((region), (product), ())`

rollupSQL := `SELECT year, quarter, SUM(revenue)
    FROM sales GROUP BY ROLLUP (year, quarter)`

cubeSQL := `SELECT region, product, SUM(amount)
    FROM sales GROUP BY CUBE (region, product)`

// MERGE Statement (SQL:2003 F312)
mergeSQL := `MERGE INTO target t USING source s ON t.id = s.id
    WHEN MATCHED THEN UPDATE SET t.value = s.value
    WHEN NOT MATCHED THEN INSERT (id, value) VALUES (s.id, s.value)`

Performance:

GoSQLX Library achieves: - 1.38M+ sustained operations/second (validated benchmarks) - 1.5M+ operations/second peak throughput (concurrent) - 8M+ tokens/second processing speed - <1ΞΌs latency for complex queries with window functions - Linear scaling to 128+ cores - 60-80% memory reduction with object pooling - Zero memory leaks under extended load - Race-free concurrent operation validated

CLI Performance: - 1.38M+ operations/second SQL validation - 2,600+ files/second formatting throughput - 1M+ queries/second analysis performance - Memory leak prevention with proper AST cleanup

Package Organization ΒΆ

Core Packages:

  • pkg/sql/tokenizer: Zero-copy SQL tokenization (8M+ tokens/sec)
  • pkg/sql/parser: Recursive descent parser with comprehensive SQL support
  • pkg/sql/ast: Abstract Syntax Tree nodes with visitor pattern (73.4% coverage)
  • pkg/sql/keywords: Multi-dialect keyword recognition (PostgreSQL, MySQL, SQLite, etc.)
  • pkg/sql/token: Token type definitions and pool management
  • pkg/models: Core data structures (100% test coverage)
  • pkg/errors: Structured error handling with position tracking

Analysis and Tooling:

  • pkg/linter: SQL linting with 10 built-in rules (L001-L010)
  • pkg/sql/security: SQL injection detection with severity classification
  • pkg/metrics: Performance monitoring and observability
  • pkg/lsp: Language Server Protocol server for IDE integration

Configuration and Compatibility:

  • pkg/config: Unified configuration management (YAML/JSON/env/LSP)
  • pkg/compatibility: Backward compatibility testing suite

CLI and Integration:

  • cmd/gosqlx: Production-ready command-line tool
  • examples: Tutorial examples and real-world usage patterns

IDE Integration ΒΆ

GoSQLX provides a full-featured LSP server for IDE integration:

gosqlx lsp --log /tmp/lsp.log

Features:

  • Real-time syntax validation
  • Hover documentation
  • Code completion
  • Intelligent formatting
  • Diagnostic messages
  • Workspace configuration

See docs/LSP_GUIDE.md for complete IDE setup instructions.

SQL Linting ΒΆ

Built-in linting rules (L001-L010):

  • L001: Enforce uppercase keywords
  • L002: Consistent indentation
  • L003: Avoid SELECT *
  • L004: Consistent alias style
  • L005: Trailing whitespace
  • L006-L010: Additional style rules

See docs/LINTING_RULES.md for complete linting reference.

Documentation ΒΆ

Complete documentation available at:

  • docs/GETTING_STARTED.md - Quick start guide
  • docs/USAGE_GUIDE.md - Comprehensive usage guide
  • docs/API_REFERENCE.md - Complete API documentation
  • docs/CONFIGURATION.md - Configuration file guide
  • docs/LSP_GUIDE.md - LSP server and IDE integration
  • docs/LINTING_RULES.md - All linting rules reference
  • docs/SQL_COMPATIBILITY.md - SQL dialect compatibility matrix
  • docs/ARCHITECTURE.md - System architecture details
  • docs/PERFORMANCE_TUNING.md - Performance optimization guide
  • docs/TROUBLESHOOTING.md - Common issues and solutions

Version History ΒΆ

v1.13.0: ClickHouse dialect, LSP semantic tokens, parser API consolidation v1.12.1: Website performance - mobile 94, desktop 100, self-hosted fonts, CLS 0 v1.12.0: Custom domain gosqlx.dev, remote MCP server at mcp.gosqlx.dev v1.11.1: Website audit fixes, SEO, lazy WASM, design polish v1.11.0: VS Code Marketplace publishing with bundled platform-specific binaries v1.10.0: MCP Server - all SQL tools as Model Context Protocol tools over streamable HTTP v1.9.0: SQLite PRAGMA, tautology detection, 19 post-UAT fixes v1.8.0: Multi-dialect engine, query transforms, WASM playground, AST-to-SQL roundtrip v1.6.0: PostgreSQL extensions (LATERAL, JSON operators, DISTINCT ON, FILTER, RETURNING) v1.5.0: GROUPING SETS, ROLLUP, CUBE, MERGE statements, materialized views v1.4.0: Window functions with PARTITION BY, ORDER BY, frame clauses v1.3.0: Common Table Expressions (CTEs) and recursive CTEs v1.2.0: Set operations (UNION, EXCEPT, INTERSECT) v1.1.0: Complete JOIN support v1.0.0: Initial release with basic SQL parsing

For more examples and detailed documentation, see: https://github.com/ajitpratap0/GoSQLX

Directories ΒΆ

Path Synopsis
cmd
gosqlx command
Package main provides the gosqlx command-line interface for high-performance SQL parsing, validation, formatting, and analysis.
Package main provides the gosqlx command-line interface for high-performance SQL parsing, validation, formatting, and analysis.
gosqlx-mcp command
Package main is the entry point for the gosqlx-mcp MCP server.
Package main is the entry point for the gosqlx-mcp MCP server.
gosqlx/cmd
Package cmd implements the CLI command structure for gosqlx using the Cobra framework.
Package cmd implements the CLI command structure for gosqlx using the Cobra framework.
gosqlx/internal/actioncmd
Package actioncmd implements the gosqlx action subcommand for GitHub Actions CI.
Package actioncmd implements the gosqlx action subcommand for GitHub Actions CI.
gosqlx/internal/config
Package config provides configuration file management for the gosqlx CLI.
Package config provides configuration file management for the gosqlx CLI.
gosqlx/internal/lspcmd
Package lspcmd implements the gosqlx lsp subcommand.
Package lspcmd implements the gosqlx lsp subcommand.
gosqlx/internal/optimizecmd
Package optimizecmd implements the gosqlx optimize subcommand.
Package optimizecmd implements the gosqlx optimize subcommand.
gosqlx/internal/output
Package output provides output formatting for the gosqlx CLI.
Package output provides output formatting for the gosqlx CLI.
gosqlx/internal/validate
Package validate provides security validation for file access in the gosqlx CLI.
Package validate provides security validation for file access in the gosqlx CLI.
Package main demonstrates PostgreSQL DISTINCT ON clause parsing
Package main demonstrates PostgreSQL DISTINCT ON clause parsing
cmd command
error-demo command
linter-example command
multirow_insert command
postgresql/filter-clause command
Package main demonstrates PostgreSQL FILTER clause parsing capabilities
Package main demonstrates PostgreSQL FILTER clause parsing capabilities
postgresql/jsonb-operators command
Package main demonstrates PostgreSQL JSON/JSONB operator parsing capabilities
Package main demonstrates PostgreSQL JSON/JSONB operator parsing capabilities
postgresql/lateral-join command
Package main demonstrates PostgreSQL LATERAL JOIN parsing capabilities
Package main demonstrates PostgreSQL LATERAL JOIN parsing capabilities
postgresql/returning-clause command
Package main demonstrates PostgreSQL RETURNING clause parsing capabilities
Package main demonstrates PostgreSQL RETURNING clause parsing capabilities
sql-formatter command
sql-validator command
transform command
Package main demonstrates the GoSQLX Query Rewriting/Transform API.
Package main demonstrates the GoSQLX Query Rewriting/Transform API.
pkg
advisor
Package advisor provides SQL query optimization analysis by walking parsed ASTs and applying configurable rules that detect common performance anti-patterns.
Package advisor provides SQL query optimization analysis by walking parsed ASTs and applying configurable rules that detect common performance anti-patterns.
cbinding command
Package main is compiled as a C-shared library (libgosqlx) that exposes the GoSQLX SQL parsing engine to non-Go languages via a plain C FFI.
Package main is compiled as a C-shared library (libgosqlx) that exposes the GoSQLX SQL parsing engine to non-Go languages via a plain C FFI.
compatibility
Package compatibility provides comprehensive backward compatibility testing for GoSQLX to ensure version-to-version stability and prevent regressions across v1.x releases.
Package compatibility provides comprehensive backward compatibility testing for GoSQLX to ensure version-to-version stability and prevent regressions across v1.x releases.
config
Package config provides unified configuration management for GoSQLX across CLI, LSP server, and IDE integrations.
Package config provides unified configuration management for GoSQLX across CLI, LSP server, and IDE integrations.
errors
Package errors provides a structured error system for GoSQLX v1.6.0 with rich context, intelligent suggestions, and comprehensive error codes.
Package errors provides a structured error system for GoSQLX v1.6.0 with rich context, intelligent suggestions, and comprehensive error codes.
fingerprint
Package fingerprint provides SQL query normalization and fingerprinting.
Package fingerprint provides SQL query normalization and fingerprinting.
formatter
Package formatter provides a public API for formatting and pretty-printing SQL strings.
Package formatter provides a public API for formatting and pretty-printing SQL strings.
gosqlx
Package gosqlx provides high-level convenience functions for SQL parsing, validation, formatting, and metadata extraction, with automatic object pool management.
Package gosqlx provides high-level convenience functions for SQL parsing, validation, formatting, and metadata extraction, with automatic object pool management.
gosqlx/testing
Package testing provides comprehensive SQL parsing test helpers for use in Go test suites.
Package testing provides comprehensive SQL parsing test helpers for use in Go test suites.
linter
Package linter provides a comprehensive SQL linting engine for GoSQLX with configurable rules, auto-fix capabilities, and detailed violation reporting.
Package linter provides a comprehensive SQL linting engine for GoSQLX with configurable rules, auto-fix capabilities, and detailed violation reporting.
linter/rules/keywords
Package keywords provides linting rules for SQL keyword formatting and consistency.
Package keywords provides linting rules for SQL keyword formatting and consistency.
linter/rules/naming
Package naming provides linter rules for SQL naming conventions and style.
Package naming provides linter rules for SQL naming conventions and style.
linter/rules/performance
Package performance provides linter rules for detecting SQL anti-patterns that cause poor query performance, full table scans, or N+1 problems.
Package performance provides linter rules for detecting SQL anti-patterns that cause poor query performance, full table scans, or N+1 problems.
linter/rules/safety
Package safety provides linter rules for detecting dangerous SQL operations that can cause irreversible data loss or security vulnerabilities.
Package safety provides linter rules for detecting dangerous SQL operations that can cause irreversible data loss or security vulnerabilities.
linter/rules/style
Package style provides linting rules for SQL style and formatting conventions.
Package style provides linting rules for SQL style and formatting conventions.
linter/rules/whitespace
Package whitespace provides linting rules for whitespace and formatting issues.
Package whitespace provides linting rules for whitespace and formatting issues.
lsp
Package lsp implements a production-ready Language Server Protocol (LSP) server for GoSQLX.
Package lsp implements a production-ready Language Server Protocol (LSP) server for GoSQLX.
mcp
Package mcp provides a Model Context Protocol (MCP) server for GoSQLX.
Package mcp provides a Model Context Protocol (MCP) server for GoSQLX.
metrics
Package metrics provides production-grade performance monitoring and observability for GoSQLX operations.
Package metrics provides production-grade performance monitoring and observability for GoSQLX operations.
models
Package models provides the core data structures for SQL tokenization and parsing in GoSQLX.
Package models provides the core data structures for SQL tokenization and parsing in GoSQLX.
schema
Package schema provides schema-aware SQL validation for GoSQLX.
Package schema provides schema-aware SQL validation for GoSQLX.
schema/db
Package db provides types and interfaces for live database schema introspection.
Package db provides types and interfaces for live database schema introspection.
schema/mysql
Package mysql provides a live schema Loader for MySQL databases.
Package mysql provides a live schema Loader for MySQL databases.
schema/postgres
Package postgres provides a live schema Loader for PostgreSQL databases.
Package postgres provides a live schema Loader for PostgreSQL databases.
schema/sqlite
Package sqlite provides a live schema Loader for SQLite databases.
Package sqlite provides a live schema Loader for SQLite databases.
sql
Package sql provides the core SQL parsing infrastructure for GoSQLX, including tokenization, parsing, AST generation, and SQL dialect support.
Package sql provides the core SQL parsing infrastructure for GoSQLX, including tokenization, parsing, AST generation, and SQL dialect support.
sql/ast
Package ast provides Abstract Syntax Tree (AST) node definitions, visitor-based traversal, and SQL() serialization for SQL statements parsed by GoSQLX.
Package ast provides Abstract Syntax Tree (AST) node definitions, visitor-based traversal, and SQL() serialization for SQL statements parsed by GoSQLX.
sql/keywords
Package keywords provides SQL keyword definitions and categorization for multiple SQL dialects.
Package keywords provides SQL keyword definitions and categorization for multiple SQL dialects.
sql/monitor
Package monitor provides lightweight performance monitoring for GoSQLX operations.
Package monitor provides lightweight performance monitoring for GoSQLX operations.
sql/parser
Package parser provides a high-performance, production-ready recursive descent SQL parser that converts tokenized SQL into a comprehensive Abstract Syntax Tree (AST).
Package parser provides a high-performance, production-ready recursive descent SQL parser that converts tokenized SQL into a comprehensive Abstract Syntax Tree (AST).
sql/security
Package security provides SQL injection detection and security scanning for GoSQLX.
Package security provides SQL injection detection and security scanning for GoSQLX.
sql/token
Package token defines the Token struct and object pool for SQL lexical analysis.
Package token defines the Token struct and object pool for SQL lexical analysis.
sql/tokenizer
Package tokenizer provides high-performance SQL tokenization with zero-copy operations and comprehensive Unicode support.
Package tokenizer provides high-performance SQL tokenization with zero-copy operations and comprehensive Unicode support.
transform
Package transform provides composable SQL query rewriting via AST manipulation.
Package transform provides composable SQL query rewriting via AST manipulation.
transpiler
Package transpiler converts SQL from one dialect to another by parsing the input SQL, applying a chain of rewrite rules that mutate dialect-specific AST constructs in place, and then reformatting the result.
Package transpiler converts SQL from one dialect to another by parsing the input SQL, applying a chain of rewrite rules that mutate dialect-specific AST constructs in place, and then reformatting the result.
transpiler/rules
Package rules contains individual dialect rewrite rules used by the transpiler.
Package rules contains individual dialect rewrite rules used by the transpiler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL