Skip to content

ajitpratap0/GoSQLX

v1.6.0 Feature

This release adds 3 notable features for engineering teams evaluating rollout.

✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

ast cli dialect go lsp mysql
+13 more
parser postgresql query-analyzer security sql sql-formatter sql-injection sql-linter sql-parser sql-validator sqlite wasm zero-copy

Summary

AI summary

Adds full PostgreSQL support, a Language Server Protocol implementation, and an official VSCode extension.

Full changelog

🚀 GoSQLX v1.6.0 - Major Feature Release

This release represents a major milestone with 20+ PRs merged, adding comprehensive PostgreSQL support, a full Language Server Protocol implementation, VSCode extension, and significant performance optimizations.

✨ Highlights

| Feature | Description |
|---------|-------------|
| 🐘 PostgreSQL Extensions | LATERAL JOIN, JSON/JSONB operators, DISTINCT ON, FILTER clause |
| 🔌 LSP Server | Full Language Server Protocol for IDE integration |
| 📝 VSCode Extension | Official extension with syntax highlighting & autocomplete |
| ⚡ Performance | 14x faster tokens, 575x faster keyword suggestions |
| 🔍 Linter Rules | 10 built-in rules (L001-L010) with auto-fix |


🐘 PostgreSQL Features (PRs #173-#177)

LATERAL JOIN Support

SELECT u.name, recent_orders.total
FROM users u
LEFT JOIN LATERAL (
    SELECT SUM(amount) as total FROM orders WHERE user_id = u.id
) AS recent_orders ON true

JSON/JSONB Operators

  • Arrow operators: ->, ->>
  • Path operators: #>, #>>
  • Containment: @>, <@
  • Existence: ?, ?|, ?&
  • Delete: #-
SELECT data -> 'user' ->> 'email', 
       data #> '{address,city}'
FROM users 
WHERE data @> '{"active": true}'

DISTINCT ON & FILTER Clause

SELECT DISTINCT ON (user_id) user_id, created_at, status
FROM orders ORDER BY user_id, created_at DESC;

SELECT COUNT(*) FILTER (WHERE status = 'completed') FROM orders;

🔌 Language Server Protocol (PRs #128-#129)

Full LSP implementation for IDE integration:

  • Diagnostics: Real-time syntax error detection
  • Hover: Documentation for 60+ SQL keywords
  • Completion: 100+ keywords, functions, and 22 snippets
  • Formatting: SQL code formatting
  • Document Symbols: Statement outline navigation
  • Signature Help: Function signatures for 20+ SQL functions
  • Code Actions: Quick fixes (add semicolon, uppercase keywords)
gosqlx lsp              # Start LSP server
gosqlx lsp --log /tmp/lsp.log  # With debug logging

📝 VSCode Extension (PRs #132, #135)

Official GoSQLX extension for Visual Studio Code:

  • Real-time SQL validation via LSP
  • SQL syntax highlighting with TextMate grammar
  • SQL formatting with customizable options
  • Intelligent autocomplete
  • Multi-dialect support

🔍 Linter Rules (PRs #164, #176)

10 built-in rules with auto-fix:

| Rule | Description |
|------|-------------|
| L001 | Avoid SELECT * |
| L002 | Missing table aliases in JOIN |
| L003 | Implicit column aliases |
| L004 | Missing WHERE in UPDATE/DELETE |
| L005 | Inefficient LIKE patterns |
| L006 | Use explicit JOIN syntax |
| L007 | ORDER BY ordinal numbers |
| L008 | Inconsistent keyword casing |
| L009 | Missing column list in INSERT |
| L010 | DISTINCT without ORDER BY |

gosqlx lint query.sql
gosqlx lint --fix query.sql

⚡ Performance Improvements

  • 14x faster token type comparison with O(1) int-based lookups
  • 575x faster keyword suggestions with caching
  • 22.5x faster config file loading
  • 1.38M+ ops/sec sustained throughput maintained

🛠️ Developer Tools

  • go-task: Modern Taskfile.yml replacing Makefile
  • Structured Errors: Error codes E1001-E3004
  • Security Scanner: Enhanced SQL injection detection
  • Test Coverage: AST 80%+, Models 100%

📦 Installation

# Library
go get github.com/ajitpratap0/[email protected]

# CLI
go install github.com/ajitpratap0/GoSQLX/cmd/[email protected]

📋 Full Changelog

See CHANGELOG.md for the complete list of changes.

Full Changelog: https://github.com/ajitpratap0/GoSQLX/compare/v1.5.1...v1.6.0

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track ajitpratap0/GoSQLX

Get notified when new releases ship.

Sign up free

About ajitpratap0/GoSQLX

7 SQL tools (validate, format, parse, lint, security scan, metadata extraction, full analysis) over Streamable HTTP. Public remote server at mcp.gosqlx.dev - no install needed. 1.25M+ ops/sec, 6 SQL dialects.

All releases →

Related context

Beta — feedback welcome: [email protected]