Skip to content

Releases: VheissuLabs/tql

v0.15.0

Choose a tag to compare

@github-actions github-actions released this 16 Oct 20:39

Snowflake, over its SQL API with a programmatic access token.

New Features

  • Snowflake connections: browse and query, every schema under folding
    headers, declared primary and foreign keys for links and paging, and every
    type shown as Snowflake writes it: dates, times, timestamps with their
    offsets, variants on one line and binary as hex. Tables, columns and keys
    come from SHOW commands, which do not wake the warehouse. Tables are read
    only in the grid, since Snowflake does not enforce primary keys; the SQL
    editor runs what the role allows (#8).
  • The connection form asks a Snowflake connection for its Account, Database,
    Access token, Warehouse and Role. tql open and :open take
    snowflake://user:token@account/DATABASE?warehouse=WH&role=ROLE.

Bug Fixes

  • Opening a connection string tql has already saved keeps the password it
    carries, and a Snowflake warehouse and role, rather than the ones saved
    before, so a changed password works the first time (#10).
  • A connection with no port, libSQL or Snowflake, no longer shows a stray
    colon after its host in the connection list.

What's Changed

  • Add Snowflake: browse and query over its SQL API by @krlmrr in #8
  • test: Snowflake against a fake SQL API, and live against a seeded account by @krlmrr in #9
  • fix: re-opening a saved connection string keeps the password it carries by @krlmrr in #10
  • docs: Snowflake connections by @krlmrr in #11

Full Changelog: v0.14.2...v0.15.0

v0.14.2

Choose a tag to compare

@github-actions github-actions released this 16 Oct 15:04

Open a saved connection by name, straight from the shell.

New Features

  • tql connect skips the connection list and opens the saved
    connection you name, as if you had picked it there. --db= opens
    another database on the same server for that session, without changing
    what is saved; on SQLite and DuckDB, which are one database, it says so.
    A path or connection string given to connect still opens it the way tql
    open does. Thanks to Jerry Lopez (#7).

Bug Fixes

  • tql connect with a database file that is not there yet says No such file,
    as tql open does, rather than that no connection has that name.

What's Changed

  • Add tql connect: open a saved connection by name by @jerrylopez in #7

New Contributors

Full Changelog: v0.14.1...v0.14.2

v0.14.1

Choose a tag to compare

@github-actions github-actions released this 14 Oct 01:09

Fixes for the drivers 0.14.0 brought in: SQL Server, ClickHouse and Redis/Valkey.

Bug Fixes

  • SQL Server: a read-only connection, and the MCP run-query tool, refuse a
    statement that carries use, commit, kill, dbcc or other T-SQL after a
    select. T-SQL needs no ; between statements, so these got past the check.
  • SQL Server: queries slower than 30 seconds finish instead of failing and
    dropping the connection, and tql connects again when a connection drops.
  • SQL Server: exports load back. Computed and rowversion columns are left
    out, identity values are kept, and very large floats are written with an
    exponent.
  • SQL Server: column names complete in the SQL editor; hex typed into a
    varbinary column is written as bytes; contains, starts with and ends with
    match datetime and money values as the grid shows them; a filter copied to
    the editor keeps N'' on text; the editor keeps [a;b] names whole, splits on
    GO lines and keeps a procedure, function or trigger body together; and
    nvarchar, nchar, datetime2, time and datetimeoffset show their declared
    sizes.
  • ClickHouse: tables page in a stable order, in the grid and in tql export,
    so rows are no longer skipped or repeated.
  • ClickHouse: read-only users can connect, answers over 10 MB come through,
    and an error partway through a query shows ClickHouse's own message.
  • ClickHouse: ssl_ca, client certificates and the TLS modes are honoured; a
    session is kept, so temporary tables and SET last between statements;
    written rows are reported; IPv6 hosts connect; and tql load replays into
    ClickHouse one statement at a time.
  • Redis/Valkey: :w checks every key before writing and writes nothing if one
    is not the type the changes expect. If Redis may have taken only part of a
    write, tql drops the pending changes and shows what is there, rather than
    writing them twice.
  • Redis/Valkey: N refuses a key that already exists instead of overwriting
    it.
  • Redis/Valkey: a silent server times out instead of freezing tql, and a
    dropped connection reconnects.
  • Redis/Valkey: ssl_ca, client certificates and the TLS modes are honoured,
    so self-signed and private-CA servers work.
  • Redis/Valkey: binary key names stay apart; an ACL user sees the real types
    of the keys it may read; a rename with changes pending is refused; a very
    large string is shown in part; a read-only connection can run INFO, CONFIG
    GET and other read commands but not scripts; T says when the key does not
    exist; and stream entries keep repeated field names.

Changes

  • ClickHouse arrays and maps show in ClickHouse's own syntax, ['a','b'] and
    {'x':1}, rather than as JSON.

Full Changelog: v0.14.0...v0.14.1

v0.14.0

Choose a tag to compare

@github-actions github-actions released this 12 Oct 20:07

Four new kinds of database, schemas, and completion that knows them.

New Features

  • Postgres and SQL Server list the tables of every schema under folding
    headers, remembered per connection and database. A table outside your
    default schema is named schema.table everywhere: the grid, the palette,
    links, exports, tql tables, tql describe, tql export and the MCP tools.
  • Completion offers schemas and the tables in them, narrows to a schema after
    "schema.", and completes the columns of schema.table and its alias (#5).
  • DuckDB files open in tql, with their schemas, every DuckDB type shown
    readably, and editing by primary key.
  • libSQL and Turso connections, by URL and auth token, over Turso's HTTP API,
    with editing as SQLite has.
  • ClickHouse connections over its HTTP interface, browse and query only, with
    every ClickHouse type shown exactly.
  • Redis and Valkey connections open a key browser: folding : namespaces
    scanned in the background, a view for every type, edits written together on
    :w, TTL, rename, database switching and a command pane. On Redis 7.4 and
    Valkey 9 a hash shows each field's TTL and T sets it; :log shows the command
    log (Valkey) or slow log (Redis).
  • tql open and :open take a DuckDB file, libsql:// and https://…?authToken=
    URLs, and clickhouse://, redis:// and valkey:// URLs and their TLS forms.
    TablePlus import brings ClickHouse and DuckDB connections over.

Enhancements

  • The status line shows the cursor's row among all the table's rows, 105 of
    5,000,000, in place of the column position. Filtered tables and small ones
    are counted exactly; a big Postgres, MySQL or SQL Server table shows the
    database's own estimate, ~4.9M, rather than wait on a full count.
  • sql_keyword_case (in [ui] and the settings screen) sets the case completion
    writes keywords in: match (how you type, as before), upper or lower. A
    config file from an earlier tql is offered it on first run.
  • Enter takes a completion as tab does.

Bug Fixes

  • The insert-mode cursor in the SQL editor and the Redis command pane sits
    right after the text, not a row down and a column over.

Full Changelog: v0.13.2...v0.14.0

v0.13.2

Choose a tag to compare

@github-actions github-actions released this 12 Oct 13:25

More of tql's shell commands, from inside tql.

New Features

  • :update checks for a newer tql and installs it while you keep working. The
    status bar says it is checking, then what it found: that you have the latest,
    that it is updating, or why it could not. It is the same check tql update
    runs, on the connection list or with a connection open.
  • :open takes a SQLite file or a mysql://, pgsql:// or sqlsrv:// connection
    string and switches to it, saved to the connection list the way tql open
    saves it, and one you already have is reused rather than saved twice. :open
    on its own waits on the command line for the path.
  • :export database writes every table in the database you are in to one .sql
    file, beside :export for the table on screen.
  • :v and :version say which version of tql you are running.
  • :help and :h open help, as ? does.

Enhancements

  • All of these are in the ctrl+k palette too, and the help screen and
    docs/keys.md list them.

Full Changelog: v0.13.1...v0.13.2

v0.13.1

Choose a tag to compare

@github-actions github-actions released this 12 Oct 13:02

The SQL editor on demand, and a settings screen that is easier to type into.

New Features

  • Show or hide the SQL editor from the ctrl+k palette, or with | (shift and ,
    next to \ for the table list). Showing it opens the editor with your last
    statement; hiding it says which key brings it back. With sql_always on,
    hiding it holds until you show it again or quit, and your setting is left
    as it is. The key can be rebound as toggle_sql.

Enhancements

  • Editing a setting starts with its value selected: type to replace it,
    backspace to clear it, or ← and → to keep it and edit in place.
  • The palette lists tables, rows, reload and query history once each, as the
    keyed action with its shortcut, instead of a second time as a : command.

Bug Fixes

  • Editing a setting shows your terminal's own cursor after the value, on a row
    that keeps its highlight, so it can be seen whatever your theme colours. The
    value is underlined while typing would replace it.
  • The record inspector lines up related rows and column types that hold wide
    characters such as Chinese, Japanese and emoji, measuring them by the
    columns they take on screen.
  • A setting's description breaks a word too long for the line instead of
    running past the edge.

Full Changelog: v0.13.0...v0.13.1

v0.13.0

Choose a tag to compare

@github-actions github-actions released this 11 Oct 18:26

Settings on a screen, and one set of commands everywhere.

New Features

  • Change your settings without opening a file. tql settings, :settings, or
    Settings in the ctrl+k palette opens every setting on one screen, under UI,
    Theme, Updates, AI, MCP and Icons sections that fold. A change takes effect at
    once and is written to config.toml straight away: that one line, your
    comments and order kept, and a setting your file does not have yet is added
    with its comment.
  • Each setting is edited the way it reads: enter flips one that is on or off,
    ← and → step through choices such as sql_editor, row_style and the theme
    colours, numbers are typed and held to their range, x puts a setting back to
    its default, and / finds one by name. The highlighted setting shows what it
    does, a value you have changed is drawn in your edited colour, the AI key is
    never shown, and the few tql reads only as it starts, such as mouse, say so.
  • The connection list has a ctrl+k palette too, with its commands and every
    connection by name: type part of one and press enter to open it.
  • A command that needs the screen runs from the shell and opens tql on it:
    tql new opens the new connection form, and tql sql and tql history open the
    SQL editor or the query history on the connection you name, or ask for one
    first.

Enhancements

  • One list of commands sits behind :, both palettes and the shell, so a command
    has one name wherever you type it. A command typed on the wrong screen says
    where it works, such as ":sql works once a connection is open".
  • The palette matches a command by its name as well as its description, so
    typing settings runs the command ahead of a table that happens to be called
    settings.

Full Changelog: v0.12.2...v0.13.0

v0.12.2

Choose a tag to compare

@github-actions github-actions released this 11 Oct 17:49

A round of fixes across the drivers, plus a little more room in the SQL editor.

Enhancements

  • One column of space between the SQL editor's border and its text. The
    cursor, click targets and the completion list all move with it, so they still
    line up with the text.
  • The driver is a type now rather than a string. A connection saved as mariadb
    is MySQL everywhere, including dump and load, a stored driver value tql no
    longer knows is skipped when the connection list is read instead of breaking
    it, and the default ports come from one place: MySQL and MariaDB 3306,
    Postgres 5432, SQL Server 1433.

Bug Fixes

  • Read-only is enforced by the database, so a write cannot slip through. SQLite
    runs the statement with query_only, and MySQL and Postgres in a read-only
    transaction. SQL Server has no read-only transaction, so tql refuses a
    statement with a writing word such as update or into anywhere outside its
    strings and comments, which catches an OUTPUT clause or a write in a
    subquery, and runs the rest in a transaction it always rolls back. That
    covers the agent commands, the MCP query tool and the SQL editor on a
    read-only connection, and it catches a write hidden in a with that the old
    first-word check let through.
  • Wide characters such as Chinese, Japanese and emoji are measured as two
    columns in the SQL editor, the row form, the filter value, the value viewer,
    the connection form and group rename, so they wrap, scroll, place the cursor
    and take clicks without eating a border or losing their end.
  • An export pages through a table in the order of its whole primary key,
    composite keys too, and a failed key lookup stops the export rather than
    carrying on and paging in no order.
  • An edit or delete that reaches no row now says so and stays pending instead
    of reporting it was written. MySQL counts matched rows, so an edit that
    changes nothing no longer looks like it missed, and sorting a query result
    only touches the statement's own order by and limit, never words inside
    strings, subqueries or comments.
  • A MariaDB export loads back, Postgres shows the first result when several
    statements return rows, MySQL shows dates and times the same with or without
    a filter, and a whole real value stays a real when shown or exported.
  • MySQL BIT columns show as numbers, and an edited or added bit is written back
    as a number.
  • sync knows a database is itself however its host, port or MySQL flavour is
    written, so two connections that differ only in 127.0.0.1 versus localhost,
    or in a written-out port, are no longer taken for one another.
  • The record inspector measures its related rows at full width, so it widens
    once when a relation opens instead of adding two columns on every redraw.
  • The production safeguards for creating a database and sharing the screen read
    the tag whatever its case, as the dump guard does, and a huge status_seconds
    no longer panics.
  • A mouse offset or a column drag can no longer push a position out of range,
    and a nonsense mouse_row_offset or mouse_column_offset in the config is held
    to ±1000.
  • A corrupt stored password, an oversized MCP cursor, a nonsense last-update
    time or an extreme mouse offset no longer panics; ssh reads the host as the
    destination; a DSN takes a bracketed IPv6 host and decodes only real percent
    escapes; and the AI answer is found after braces in its reasoning.
  • The SQL editor's text wrap returns early for a zero width instead of looping.

Full Changelog: v0.12.1...v0.12.2

v0.12.1

Choose a tag to compare

@github-actions github-actions released this 11 Oct 02:00

Full Changelog: v0.12.0...v0.12.1

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 11 Oct 01:31

tql is rewritten in Rust. It is the same tql: the same screens, keys,
commands, config and connections, checked frame by frame against 0.11. It is
also a third of the size (11 MB on a Mac, down from 35), starts in about 7 ms
instead of 170, and needs nothing else installed.

Moving over

  • Your connections, passwords, settings and history carry over as they are, from
    the same ~/.config/tql. New settings are added to config.toml with a notice.
  • Installed with the install script or by hand, tql updates itself to 0.12.0 as
    usual. Homebrew, .deb, .rpm and PKGBUILD upgrade the usual way.
  • tql.phar is gone. If you ran the phar, install one of the binaries instead.

New

  • SQL Server is built in on macOS and Linux. Microsoft's ODBC driver and OpenSSL
    are no longer needed. It needs a server with TLS 1.2 or newer.
  • For agents: the MCP server's write-sql-tool puts a statement in the SQL editor
    of the tql you have open, for you to read and run; nothing runs by itself. Its
    read-screen-tool lets an agent see what you see, once you turn on
    [mcp] read_screen.
  • e on a group header in the connection list renames the group.
  • Creating a database on a connection tagged production asks first
    ([ui] confirm_create_on_production turns it off).
  • [ui] bottom_margin, left_margin and right_margin, beside top_margin. All four
    default to 0, and the frame now reaches the last row and column.
  • Asking for SQL with a no longer freezes tql while the model thinks, and esc
    cancels it. TQL_AI_* variables work, and with nothing configured a says what
    to set.
  • Opening a connection keeps tql on screen and says it is connecting.

Fixed

  • A MySQL connection through an SSH tunnel stays on TCP, instead of trying a
    socket path from the server on your machine.
  • Errors are in the database's own words, without PDO's SQLSTATE prefix.
  • The SQL editor on a read-only connection runs only statements that read.
  • A :w where one write fails keeps only what was not written.

Everything that behaves differently from 0.11 on purpose is listed in
parity/deliberate.md.

What's Changed

  • docs: rewrite every em dash as a plain sentence by @krlmrr in #6

Full Changelog: v0.11.0...v0.12.0