Skip to content

Releases: sadopc/gotermsql

v0.5.2

13 Feb 18:00

Choose a tag to compare

Bug Fixes

  • Fix tab switch focus loss — switching tabs now properly blurs the old tab and focuses the new tab's editor/results, preventing silent input loss
  • Fix reconnect resource leak — reconnecting now cancels in-flight queries, closes streaming iterators, and clears execution state before closing the old connection
  • Fix quit resource leak — Ctrl+Q now cancels queries and closes iterators before exiting
  • Fix connection manager File field — added missing File input to the connection manager form so sqlite/duckdb file paths are preserved on edit/save
  • Fix status bar stale timer — ClearStatusMsg now carries a generation counter so older timers don't prematurely clear newer messages

v0.5.1

13 Feb 17:13

Choose a tag to compare

What's New

  • Ctrl+H Query History Browser — Full-screen modal to browse, search, and re-use previously executed queries. Shows query text, adapter, duration, and relative timestamp. Enter inserts the selected query into the editor.

Shortcuts

Key Action
Ctrl+H Open/close history browser
Up/Down Navigate entries
Enter Select query
Esc Close
Type Filter/search queries

v0.5.0

13 Feb 16:13

Choose a tag to compare

What's New

Audit Log

Opt-in JSON Lines audit trail for compliance and production use. Records every query execution with full context — timestamp, query text, adapter, database name, duration, row count, error status, and sanitized DSN (credentials stripped). Suitable for shipping to SIEM/log aggregators.

Enable in ~/.config/gotermsql/config.yaml:

audit:
  enabled: true
  path: ""           # defaults to ~/.config/gotermsql/audit.jsonl
  max_size_mb: 50    # rotate at 50 MB, keeps 1 backup

Each line in the audit file is a JSON object:

{"timestamp":"2026-02-13T18:23:24Z","query":"SELECT * FROM users","adapter":"postgres","database_name":"mydb","duration_ms":42,"row_count":5,"is_error":false,"dsn":"postgres://***@host:5432/mydb"}

Inspired by a Reddit user's question about auditing for production use. Thanks for the idea!

Full Changelog: v0.4.1...v0.5.0

v0.4.1

13 Feb 14:52

Choose a tag to compare

Bug Fixes

  • Neovim rendering: Fix rendering artifacts (ghost lines, duplicated sidebar entries) when running inside Neovim's floating terminal via gotermsql.nvim
    • Add GOTERMSQL_HEIGHT_OFFSET env var to compensate for libvterm alt-screen height reporting
    • Use single-width Unicode icons in sidebar when running inside Neovim (avoids libvterm emoji width mismatch)
    • Add view height clamping as safety net

v0.4.0

13 Feb 12:47

Choose a tag to compare

What's New

  • Zebra-striped results table — alternating row colors for better readability across wide tables
  • Fixed header alignment — column headers now have proper padding matching data cells
  • Custom table renderer — proper unicode truncation with ellipsis, scroll tracking
  • Ctrl+J keybinding — alias for Shift+Tab to cycle focus backwards between panes
  • New demo GIF — updated with SQLite demo showcasing all features

Full Changelog

v0.3.4...v0.4.0

v0.3.4

13 Feb 11:42

Choose a tag to compare

What's Changed

  • UI hint fix — Status bar and help overlay now show Shift+Tab for pane switching instead of Tab

Full Changelog: v0.3.3...v0.3.4

v0.3.3

13 Feb 11:33

Choose a tag to compare

What's Changed

  • Fix sidebar scrolling — Arrow keys now move the highlight within the viewport instead of scrolling the entire tree. The sidebar's height was never persisted due to being set only in View() (value receiver).

Full Changelog: v0.3.2...v0.3.3

v0.3.2

13 Feb 10:59

Choose a tag to compare

What's Changed

  • Streaming SELECT queries: SELECT-like queries now use ExecuteStreaming() with paginated RowIterator, preventing out-of-memory on large result sets. Non-SELECT statements and streaming fallback continue to use Execute().
  • Added IsSelectQuery() helper for detecting row-returning statements (SELECT, WITH, EXPLAIN, SHOW, DESCRIBE, PRAGMA, etc.)
  • Status bar shows "streaming" indicator during streaming queries

Full Changelog: v0.3.1...v0.3.2

v0.3.1

13 Feb 10:46

Choose a tag to compare

What's Changed

Fix 12 validated codex findings across safety, performance, and correctness.

High Severity

  • Connection timeouts: 30s timeout on connect() and testConnection()
  • Streaming memory bound: 5,000-row sliding window for streamed page results

Medium Severity

  • Nil panic guards: Guard msg.Err before .Error() in error handlers
  • Iterator leak fix: Close iterator on tab teardown
  • Overlapping query guard: Cancel in-flight query before starting new execution
  • SQL injection prevention: Quote identifiers in sidebar-generated SELECT queries
  • Error sanitization: Extended to cover MySQL driver and PG keyword formats
  • Completions N+1: PostgreSQL uses 3 batch queries; SQLite uses pragma_table_info JOIN

Low Severity

  • Dead code removal: Removed unused functions, fields, and message types
  • Ignored errors: Explicit discards for conn.Close(), history.Add()
  • Page fetch timeout: 30s timeout on fetchNextPage() / fetchPrevPage()

Removed

  • 10,000 row limit removed: Results now stream with pagination instead of being capped

v0.3.0

13 Feb 10:11

Choose a tag to compare

What's Changed

Bug Fixes & Correctness

  • Stale results after reconnect: Query messages now carry connection generation counters; results from old connections are discarded (H1)
  • Stuck executing state on tab close: Closing a tab during in-flight query now cancels the query and clears the executing flag (H2)
  • MySQL cancel targets wrong session: Queries are pinned to a dedicated connection so KILL QUERY always targets the correct session (H3)
  • Schema loading hangs forever: Added 30-second timeout to schema introspection (H4)
  • OOM on large SELECTs: Results capped at 10,000 rows with a status bar warning (H5)

Features & Improvements

  • Pagination now works: FetchedPageMsg is properly routed from results to the app, enabling PgUp/PgDown streaming (M1)
  • Schema warnings surfaced: Introspection errors are collected and shown as "Schema loaded with N warnings" (M2)
  • Batch schema introspection: 3 queries per schema instead of 3×N per table for PostgreSQL and MySQL (M3)
  • Connection manager persists changes: Ctrl+S and delete now save to disk immediately (M4)
  • DSN credential escaping: BuildDSN properly URL-encodes passwords with special characters (M5)
  • Panic-safe cleanup: History DB uses defer for guaranteed close (M6)
  • Atomic config writes: Config saves via temp file + rename to prevent corruption (M7)
  • Result sizing cache: Column sizing skips recomputation when dimensions haven't changed (M8)
  • Credential sanitization: Error messages strip passwords from DSN URLs before display (M9)

Full Changelog: v0.2.0...v0.3.0