Repository navigation
Table tabs get a filter and sort dialog: pick conditions, tick values (counted exactly on the server if you like), sort, hide columns, and see the exact SQL before it runs; the grid filters with = and !, and a filtered count can be the planner's estimate. On PostgreSQL, the counts, exports and catalogue reads datarig runs on its own now read at READ COMMITTED, so a SERIALIZABLE default no longer drags them into other sessions' conflicts.
Added
- Table tabs filter, sort and limit their rows on the server, in a full-screen filter dialog:
f(orSpace r f) opens it on the cursor's column,Space r oon the order, and a click on
the filter in the results border opens it too. It lists the table's columns from the
catalogue (/searches them) and builds conditions on the one selected: pick an operator
(≠leaves NULL rows out,≠ or NULLkeeps them; those the column cannot take are dimmed,
with the reason) and type a value, or tick values from the column's list, counted in the rows
loaded (~), with the values of earlier loads of the table to widen a condition. Mostly
distinct numbers show their range; long values are counted, not listed. #in the dialog counts the column's values exactly on the server, under the other
conditions only, with the time limit, lock rules and refusals of a row count (refused on
MySQL when its read would lock rows, or while settings for the next transaction wait).- The dialog's footer shows the condition as chips, the order, the limit and the SQL section:
the whole statement as it would be sent, its WHERE and ORDER BY editable as text
(Ctrl+Spacecompletes) andOpen in editor. A condition left alone is sent byte for byte;
once changed, it is its terms joined with AND, those not touched as written.Enterapplies with
every check, a refusal keeps the dialog open with the reason and the refused part underlined,
Escdrops the changes, anduorCtrl+Zundoes a step, then the last change applied to the
tab. - A condition with a comment, a
;, a row lock (FOR UPDATE, FOR SHARE) or another clause is
refused before anything is sent, and one that calls functions datarig cannot check asks
first (refused on a read-only connection); MySQL'sROW_COUNT()andFOUND_ROWS()are
refused. The order is the table's columns with ASC or DESC (NULLS FIRST or LAST on
PostgreSQL); the primary key (or, without one, the shortest unique key ofNOT NULLcolumns)
is added after it (+ id), and an order not known to be unique says so.Space r vopens the
statement in a new console,Space r xclears the condition, order and limit, and from the
command line:whereand:orderbyset the condition and the order and:filter clearclears
them. - On a table tab's grid,
=(orSpace r =) keeps only the value of the cell or of cells
selected in one column, in place of the column's own conditions, and!(orSpace r !)
keeps every row but those, the NULL ones included unless NULL is among the cells;X(or
Space r X) clears the conditions and the order.s(orSpace r s) sorts by the cursor's
column alone, going up, then down, then not at all, andS(orSpace r S) adds it as one more
key; a click at the right end of a header sorts too.F(orSpace r F, or a right click on
a header) opens the column's menu: sort, open the dialog on it, keep only or exclude the
value, clear its conditions, hide it. Each runs with the checks of the dialog'sEnter, and
the headers of filtered or sorted columns are tinted and marked. - The dialog's sort line and the column menu's sorts say where the server puts NULLs (
NULLs last,NULLs first), and a MySQLTIMESTAMPticked or taken from the grid is written as the
instant it was read as (CONVERT_TZ(…, '+00:00', @@session.time_zone)), the same after the
session's time zone changes. - Columns can be hidden from a table tab's grid:
C(orSpace r C), "Hide column" in its
menu, orSpace/Cin the dialog's column list, which shows them again. Hiding is a view
only: every column is still read, and exports, the chart and the inspector see them all. The
cursor, selections, copies, pastes and the search take the columns shown; a copy as SQL
UPDATE or INSERT keeps the key columns. Hidden columns are kept per table across restarts, in
the state directory. - A table tab's results border says what is applied at the bottom left (the first condition,
the sort, the hidden columns, shorter as the window narrows), spins while it runs and says
failedwhen the server rejected it: the earlier rows stay, dimmed, and the dialog shows the
server's message. The tab's result strip names its connection on the right. - The LIMIT caps the rows the tab reads: the pages stop there, the results title says
limit 100, and a count or an export of every row reads the same capped set. The applied
condition, order and limit are kept with the workspace and with a closed tab brought back,
and are checked again when the tab runs; a tab brought back with an order waits for the
table's keys before its first run (Ctrl+Ccancels the wait). - On MySQL, a table tab asks before it runs when its reads would lock rows (isolation level
SERIALIZABLE, or not known, with autocommit off or a transaction open), on the session the
read is sent on; a page read again or a count in that state needs that answer first. - A table tab keeps the conditions and orders that ran on each table:
Ctrl+Rin the filter
dialog (orSpace r Hfrom the grid) lists them, most recent first, and fills the dialog
with the one picked, which runs only withEnter. They stay on this machine, in a file of
the state directory only you can read (never in the workspace file);:set history.filters=off
stops keeping them and:filter history clear [all]forgets them. - On a table tab whose rows are filtered,
#offers the planner's estimate of the matching
rows (page 3 / ~12 (planner), nothing read) or the exact count. On any result, a count now
stops after 30 seconds or after waiting 2 seconds (1 on MySQL) for another session's lock,
and says the number is not known ([results] count_timeout,"off"for neither limit); on
PostgreSQL inside your own transaction it has no limit, as before.
Fixed
- On a PostgreSQL server whose role or database defaults to SERIALIZABLE, the explorer's and
a table tab's reads of the catalogue no longer run as serializable transactions: they
waited for a safe snapshot underdefault_transaction_deferrableand failed on a standby. - PostgreSQL: a row count (
#) outside your own transaction and an export no longer take part in
other sessions' serialisation failures on a server, role or database whose default isolation is
SERIALIZABLE, nor wait for a safe snapshot there. They now read at READ COMMITTED in a read-only
transaction of their own; inside your transaction they still read there, at its level. - PostgreSQL: when the session cannot tell whether a transaction is open, a row count without a
time limit and an export are refused with a note, as a count with a time limit already was, so
they never end or bypass a transaction of yours.
The archives are for macOS and Linux (arm64 and x86_64) and Windows (x86_64); SHA256SUMS lists their checksums. The Windows build is untested: CI builds it and runs its tests, but nobody has used datarig on Windows yet.
What's Changed
- build(deps): update rustix to 1.1.6 for RUSTSEC-2026-0486 by @DokaDev in #343
- build(deps): update russh to 0.65.1 for RUSTSEC-2026-0495 by @DokaDev in #348
- feat(tui): WHERE and ORDER BY line on table tabs by @DokaDev in #305
- feat(tui): keep table filters, cap them with LIMIT, ask before locking reads by @DokaDev in #319
- feat(tui): sort by column and filter by cell value by @DokaDev in #322
- feat(tui): filter history per table by @DokaDev in #325
- feat: planner estimate and bounded count for filtered tables by @DokaDev in #338
- docs: filtering and sorting a table by @DokaDev in #339
- feat: split filter terms and count values on the server by @DokaDev in #342
- feat(tui): filter and sort dialog by @DokaDev in #345
- feat(tui): grid keys, column menu and hidden columns by @DokaDev in #346
- docs: filter dialog by @DokaDev in #349
- fix(postgres): run own counts and exports at READ COMMITTED by @DokaDev in #355
- chore(release): 0.41.0 by @DokaDev in #356
Full Changelog: v0.40.5...v0.41.0