SQLCraft: SQL Formatter, Query Linter & Schema Builder Pro 🗄️
Instant SQL beautifier, single-line minifier, dangerous query safety linter, and visual CREATE TABLE DDL builder for PostgreSQL, MySQL, and SQLite directly inside Visual Studio Code.
✨ Features
✨ Instant SQL Formatter: Automatically uppercases SQL keywords, breaks clauses (SELECT, FROM, JOIN, WHERE, GROUP BY, ORDER BY) cleanly, and indents column lists and conditions while preserving string literals.
🛡️ Production Safety Linter: Real-time inline diagnostics catch catastrophic mistakes before execution:
Flags DELETE FROM without a WHERE clause.
Flags UPDATE ... SET without a WHERE clause.
Warns against SELECT * performance overhead, leading wildcard LIKE '%...' scans, and destructive DROP/TRUNCATE commands.
🗜️ 1-Click SQL Minifier: Strip comments and compress multi-line queries into compact single-line strings for logs or ORM code.
🎨 Visual CREATE TABLE Builder: Interactive studio to visually define columns, types, PRIMARY KEY, NOT NULL, and UNIQUE constraints and export dialect-specific DDL for PostgreSQL, MySQL, or SQLite.
🛠️ Usage
Format SQL: Open any .sql file (or highlight inline SQL in JS/TS/Python), right-click and choose SQLCraft: Format & Beautify SQL.
Minify SQL: Run SQLCraft: Minify SQL to Single Line from the Command Palette.
Build Schema: Run SQLCraft: Open Visual CREATE TABLE Schema Builder.