vi-sql logo

Development Route

Planned milestones in implementation order. Each stop represents a shippable improvement.

origin
01
schema

Schema Tree: Views, Materialized Views, Sequences, Functions

Add views, materialized views, sequences, and functions/procedures as separate child nodes under each schema. Read-only metadata — no DDL risk.

02
editor

Query Formatter

Bind a key to prettify the current SQL buffer. Use a Go SQL formatter (e.g. go-pgquery) and respect EditorConfig tab/space settings. Prettify queries from mcp if needed

03
editor

Vim Mode Improvements — 3 sequences, Search, Counts, Indent

Add 3 sequences to vim (`ciw`, `diw`)/. Think about: ?, n, N for search; numeric counts (3w, 5dd); >> / << for indent/dedent; % to jump matching paren.

04
query results

Editable Query Results

For simple single-table SELECT (no joins, aggregates, CTEs), enable inline CRUD using the source table from FieldDescription.TableOID. Complex queries stay read-only with a clear indicator. v1 Postgres only.

05
ux & sessions

Transaction Mode

Explicit BEGIN / COMMIT / ROLLBACK per tab with a visual badge in the tab title. Today every query autocommits. Blocks tab close with an unsaved transaction.

06
connectivity

TiDB Driver

MySQL-protocol compatible. Minimal new code on top of the existing MySQL driver.

07
query results

Query Plan Cost Warnings

Color-code nodes in the EXPLAIN viewer: seq scan on high row estimates → yellow, expensive loops → red. Summary line at top. Thresholds configurable per-connection.

08
query results

Consider: Search Within Results

Search in table view: overlay input bar, highlight matching cells, n/N to jump. Case-insensitive default, optional regex. Scoped to the currently loaded batch in v1.

09
ux & sessions

Saved / Bookmarked Queries

JSON file in config dir. Save the current buffer with a name and optional tags. Pick modal reuses fuzzy-filter pattern. :w <name> in vim mode maps to save.

10
ux & sessions

--mcp Flag: Standalone MCP Server Mode

Add a --mcp flag to launch only the MCP server without starting the full TUI. Requires a connection selection step at startup — pick from already registered connections — so the correct driver is loaded before the server begins accepting requests.

11
ux & sessions

Tab / Session Persistence

On clean exit, persist open query tabs per connection — buffer text, active tab, cursor offset. Restore on reconnect.

12
editor

Consider: Vim Mode in Other Inputs

Extend vim coverage to schema-tree filter bar, inline edit modals, value editors, and peeker — or document the scope explicitly so users are not surprised.

13
connectivity

MSSQL Driver

Standard SQL — schemas, DDL, and indexes map cleanly. go-mssqldb is mature. Main differences are @p1 placeholders and TOP N instead of LIMIT.

14
connectivity

DuckDB Driver

Standard SQL (PostgreSQL dialect), schemas, DDL, indexes. go-duckdb driver exists. Embedded like SQLite — no network connection needed. Ideal for local analytics workflows.

15
query results

Result Row to INSERT Statement

Copy a selected row as an INSERT INTO ... VALUES (...) statement to clipboard. Same code path as SQL export, scoped to one row.

16
query results

Result Set Diffing

Snapshot current result, run a variant query, show rows added/removed/modified and exec-time delta. Niche but powerful for verifying index changes.

17
connectivity

Oracle Driver

SQL-shaped but quirky DDL — ROWNUM vs LIMIT, non-standard type names. godror requires Oracle client libraries, which adds deployment overhead.

planned