{"id":47360525,"url":"https://github.com/ajitpratap0/GoSQLX","last_synced_at":"2026-03-18T18:00:44.870Z","repository":{"id":277953501,"uuid":"934030994","full_name":"ajitpratap0/GoSQLX","owner":"ajitpratap0","description":"High-performance SQL parser, formatter, linter \u0026 security scanner for Go — 1.5M+ ops/sec, multi-dialect, zero-copy, race-free","archived":false,"fork":false,"pushed_at":"2026-03-08T09:13:22.000Z","size":9721,"stargazers_count":49,"open_issues_count":4,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-08T12:35:31.096Z","etag":null,"topics":["ast","cli","dialect","go","golang","lsp","mysql","parser","postgresql","query-analyzer","security","sql","sql-formatter","sql-injection","sql-linter","sql-parser","sql-validator","sqlite","wasm","zero-copy"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/ajitpratap0/GoSQLX","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajitpratap0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY_CHECKLIST.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-17T06:47:21.000Z","updated_at":"2026-03-08T09:13:17.000Z","dependencies_parsed_at":"2025-08-22T07:14:07.267Z","dependency_job_id":"ee865c1d-e5c7-4c4e-9727-1aef9d3a1db0","html_url":"https://github.com/ajitpratap0/GoSQLX","commit_stats":null,"previous_names":["ajitpratap0/gosqlx"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/ajitpratap0/GoSQLX","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajitpratap0%2FGoSQLX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajitpratap0%2FGoSQLX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajitpratap0%2FGoSQLX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajitpratap0%2FGoSQLX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajitpratap0","download_url":"https://codeload.github.com/ajitpratap0/GoSQLX/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajitpratap0%2FGoSQLX/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30477251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T20:45:58.186Z","status":"ssl_error","status_checked_at":"2026-03-13T20:45:20.133Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","cli","dialect","go","golang","lsp","mysql","parser","postgresql","query-analyzer","security","sql","sql-formatter","sql-injection","sql-linter","sql-parser","sql-validator","sqlite","wasm","zero-copy"],"created_at":"2026-03-18T14:00:33.900Z","updated_at":"2026-03-18T18:00:44.863Z","avatar_url":"https://github.com/ajitpratap0.png","language":"Go","readme":"# GoSQLX\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/ajitpratap0/GoSQLX/main/.github/logo.png\" alt=\"GoSQLX Logo\" width=\"180\"/\u003e\n\n### Parse SQL at the speed of Go\n\n[![Go Version](https://img.shields.io/badge/Go-1.25+-00ADD8?style=for-the-badge\u0026logo=go)](https://go.dev)\n[![Release](https://img.shields.io/github/v/release/ajitpratap0/GoSQLX?style=for-the-badge\u0026color=orange)](https://github.com/ajitpratap0/GoSQLX/releases)\n[![License](https://img.shields.io/badge/License-Apache--2.0-blue.svg?style=for-the-badge)](LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge)](http://makeapullrequest.com)\n\n[![Website](https://img.shields.io/badge/gosqlx.dev-Website-blue?style=for-the-badge\u0026logo=google-chrome)](https://gosqlx.dev)\n[![VS Code](https://img.shields.io/visual-studio-marketplace/v/ajitpratap0.gosqlx?style=for-the-badge\u0026logo=visual-studio-code\u0026label=VS%20Code)](https://marketplace.visualstudio.com/items?itemName=ajitpratap0.gosqlx)\n[![MCP](https://img.shields.io/badge/MCP-Remote%20Server-blue?style=for-the-badge\u0026logo=cloud)](https://mcp.gosqlx.dev/health)\n[![Glama MCP Server](https://glama.ai/mcp/servers/ajitpratap0/GoSQLX/badges/score.svg)](https://glama.ai/mcp/servers/ajitpratap0/GoSQLX)\n[![Lint Action](https://img.shields.io/badge/Lint%20Action-GitHub-blue?style=for-the-badge\u0026logo=github)](https://github.com/marketplace/actions/gosqlx-lint-action)\n\n[![Tests](https://img.shields.io/github/actions/workflow/status/ajitpratap0/GoSQLX/test.yml?branch=main\u0026label=Tests\u0026style=flat-square)](https://github.com/ajitpratap0/GoSQLX/actions)\n[![Go Report](https://goreportcard.com/badge/github.com/ajitpratap0/GoSQLX?style=flat-square)](https://goreportcard.com/report/github.com/ajitpratap0/GoSQLX)\n[![GoDoc](https://pkg.go.dev/badge/github.com/ajitpratap0/GoSQLX?style=flat-square)](https://pkg.go.dev/github.com/ajitpratap0/GoSQLX)\n[![Stars](https://img.shields.io/github/stars/ajitpratap0/GoSQLX?style=social)](https://github.com/ajitpratap0/GoSQLX)\n\n\u003cbr/\u003e\n\n**[🌐 Try the Playground](https://gosqlx.dev/playground/)** \u0026nbsp;·\u0026nbsp; **[📖 Read the Docs](https://gosqlx.dev/docs/)** \u0026nbsp;·\u0026nbsp; **[🚀 Get Started](docs/GETTING_STARTED.md)** \u0026nbsp;·\u0026nbsp; **[📊 Benchmarks](https://gosqlx.dev/benchmarks/)**\n\n\u003cbr/\u003e\n\n| **1.25M+ ops/sec** | **\u003c1μs latency** | **85% SQL-99** | **6 dialects** | **0 race conditions** |\n|:---:|:---:|:---:|:---:|:---:|\n\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\n## What is GoSQLX?\n\nGoSQLX 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.25M+ operations per second** with sub-microsecond latency.\n\n```go\nast, _ := gosqlx.Parse(\"SELECT u.name, COUNT(*) FROM users u JOIN orders o ON u.id = o.user_id GROUP BY u.name\")\n// → Full AST with statements, columns, joins, grouping - ready for analysis, transformation, or formatting\n```\n\n### Why GoSQLX?\n\n- **Not an ORM** - a parser. You get the AST, you decide what to do with it.\n- **Not slow** - zero-copy tokenization, sync.Pool recycling, no allocations on hot paths.\n- **Not limited** - PostgreSQL, MySQL, SQL Server, Oracle, SQLite, Snowflake. CTEs, window functions, MERGE, set operations.\n- **Not just a library** - CLI, VS Code extension, GitHub Action, MCP server, WASM playground, Python bindings.\n\n\u003cbr/\u003e\n\n## Get Started in 60 Seconds\n\n```bash\ngo get github.com/ajitpratap0/GoSQLX\n```\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/ajitpratap0/GoSQLX/pkg/gosqlx\"\n)\n\nfunc main() {\n    // Parse any SQL dialect\n    ast, _ := gosqlx.Parse(\"SELECT * FROM users WHERE active = true\")\n    fmt.Printf(\"%d statement(s)\\n\", len(ast.Statements))\n\n    // Format messy SQL\n    clean, _ := gosqlx.Format(\"select id,name from users where id=1\", gosqlx.DefaultFormatOptions())\n    fmt.Println(clean)\n    // SELECT\n    //   id,\n    //   name\n    // FROM users\n    // WHERE id = 1\n\n    // Catch errors before production\n    if err := gosqlx.Validate(\"SELECT * FROM\"); err != nil {\n        fmt.Println(err) // → expected table name\n    }\n}\n```\n\n\u003cbr/\u003e\n\n## Install Everywhere\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 📦 Go Library\n```bash\ngo get github.com/ajitpratap0/GoSQLX\n```\n\n### 🖥️ CLI Tool\n```bash\ngo install github.com/ajitpratap0/GoSQLX/cmd/gosqlx@latest\ngosqlx validate \"SELECT * FROM users\"\ngosqlx format query.sql\ngosqlx lint query.sql\n```\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 💻 VS Code Extension\n```bash\ncode --install-extension ajitpratap0.gosqlx\n```\nBundles the binary - zero setup. [Learn more →](https://gosqlx.dev/vscode/)\n\n### 🤖 MCP Server (AI Integration)\n```bash\nclaude mcp add --transport http gosqlx \\\n  https://mcp.gosqlx.dev/mcp\n```\n7 SQL tools in Claude, Cursor, or any MCP client. [Guide →](https://gosqlx.dev/docs/mcp_guide/)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr/\u003e\n\n## Features at a Glance\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\" width=\"33%\"\u003e\u003ch3\u003e⚡ Parser\u003c/h3\u003eZero-copy tokenizer\u003cbr/\u003eRecursive descent parser\u003cbr/\u003eFull AST generation\u003cbr/\u003eMulti-dialect engine\u003c/td\u003e\n\u003ctd align=\"center\" width=\"33%\"\u003e\u003ch3\u003e🛡️ Analysis\u003c/h3\u003eSQL injection scanner\u003cbr/\u003e10 lint rules (L001–L010)\u003cbr/\u003eQuery complexity scoring\u003cbr/\u003eMetadata extraction\u003c/td\u003e\n\u003ctd align=\"center\" width=\"33%\"\u003e\u003ch3\u003e🔧 Tooling\u003c/h3\u003eAST-based formatter\u003cbr/\u003eQuery transforms API\u003cbr/\u003eVS Code extension\u003cbr/\u003eGitHub Action\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\u003ch3\u003e🌐 Multi-Dialect\u003c/h3\u003ePostgreSQL · MySQL\u003cbr/\u003eSQL Server · Oracle\u003cbr/\u003eSQLite · Snowflake\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\u003ch3\u003e🤖 AI-Ready\u003c/h3\u003eMCP server (7 tools)\u003cbr/\u003ePublic remote endpoint\u003cbr/\u003eStreamable HTTP\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\u003ch3\u003e🧪 Battle-Tested\u003c/h3\u003e20K+ concurrent ops\u003cbr/\u003eZero race conditions\u003cbr/\u003e~85% SQL-99 compliance\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr/\u003e\n\n## Documentation\n\n| | Resource | Description |\n|---|---|---|\n| 🌐 | **[gosqlx.dev](https://gosqlx.dev)** | Website with interactive playground |\n| 🚀 | **[Getting Started](https://gosqlx.dev/docs/getting_started/)** | Parse your first SQL in 5 minutes |\n| 📖 | **[Usage Guide](https://gosqlx.dev/docs/usage_guide/)** | Comprehensive patterns and examples |\n| 📄 | **[API Reference](https://gosqlx.dev/docs/api_reference/)** | Complete API documentation |\n| 🖥️ | **[CLI Guide](https://gosqlx.dev/docs/cli_guide/)** | Command-line tool reference |\n| 🌍 | **[SQL Compatibility](https://gosqlx.dev/docs/sql_compatibility/)** | Dialect support matrix |\n| 🤖 | **[MCP Guide](https://gosqlx.dev/docs/mcp_guide/)** | AI assistant integration |\n| 🏗️ | **[Architecture](https://gosqlx.dev/docs/architecture/)** | System design deep-dive |\n| 📊 | **[Benchmarks](https://gosqlx.dev/benchmarks/)** | Performance data and methodology |\n| 📝 | **[Release Notes](https://gosqlx.dev/blog/)** | What's new in each version |\n\n\u003cbr/\u003e\n\n## Contributing\n\nGoSQLX is built by contributors like you. Whether it's a bug fix, new feature, documentation improvement, or just a typo - every contribution matters.\n\n```bash\ngit clone https://github.com/ajitpratap0/GoSQLX.git \u0026\u0026 cd GoSQLX\ntask check    # fmt → vet → lint → test (with race detection)\n```\n\n1. **Fork \u0026 branch** from `main`\n2. **Write tests** - we use TDD and require race-free code\n3. **Run `task check`** - must pass before PR\n4. **Open a PR** - we review within 24 hours\n\n📋 [Contributing Guide](CONTRIBUTING.md) · 📜 [Code of Conduct](CODE_OF_CONDUCT.md) · 🏛️ [Governance](GOVERNANCE.md)\n\n\u003cbr/\u003e\n\n## Community\n\n\u003cdiv align=\"center\"\u003e\n\n**Got questions? Ideas? Found a bug?**\n\n\u003ca href=\"https://github.com/ajitpratap0/GoSQLX/discussions\"\u003e\u003cimg src=\"https://img.shields.io/badge/💬_Discussions-Ask_\u0026_Share-purple?style=for-the-badge\" alt=\"Discussions\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ajitpratap0/GoSQLX/issues/new/choose\"\u003e\u003cimg src=\"https://img.shields.io/badge/🐛_Issues-Report_\u0026_Request-red?style=for-the-badge\" alt=\"Issues\"\u003e\u003c/a\u003e\n\u003ca href=\"https://gosqlx.dev/blog/\"\u003e\u003cimg src=\"https://img.shields.io/badge/📝_Blog-Release_Notes-green?style=for-the-badge\" alt=\"Blog\"\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\n## License\n\nApache License 2.0 - see [LICENSE](LICENSE) for details.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n\u003csub\u003eBuilt with ❤️ by the GoSQLX community\u003c/sub\u003e\n\n**[gosqlx.dev](https://gosqlx.dev)** · **[Playground](https://gosqlx.dev/playground/)** · **[Docs](https://gosqlx.dev/docs/)** · **[MCP Server](https://mcp.gosqlx.dev/mcp)** · **[VS Code](https://marketplace.visualstudio.com/items?itemName=ajitpratap0.gosqlx)**\n\n\u003cbr/\u003e\n\nIf GoSQLX helps your project, consider giving it a ⭐\n\n\u003c/div\u003e\n","funding_links":[],"categories":["Database","Data Integration Frameworks"],"sub_categories":["Database Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajitpratap0%2FGoSQLX","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajitpratap0%2FGoSQLX","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajitpratap0%2FGoSQLX/lists"}