From 2660450d1b7bc26238a3828035dbf465cdff4443 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Tue, 3 Nov 2026 23:09:09 +0700 Subject: [PATCH] docs(features): raw SQL filter checks, row switching and reruns --- databases/kafka.mdx | 5 +++++ features/data-files.mdx | 4 +++- features/filtering.mdx | 16 ++++++++++++---- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/databases/kafka.mdx b/databases/kafka.mdx index d39f00c9..8436c622 100644 --- a/databases/kafka.mdx +++ b/databases/kafka.mdx @@ -140,6 +140,11 @@ Editing a cell, deleting a row, and sorting a column are all unavailable, and th rather than failing at save time. Kafka has no update primitive, no per-message delete, and no server-side sort. To change what a consumer sees, produce a new message. +The filter bar cannot filter a topic. **Apply** reports +`This database cannot filter rows with these conditions.` and the grid keeps the messages it shows. +To read less of a topic, `CONSUME` it from an offset, a time or chosen partitions; a +[Live tab](/features/live-messages) filters new messages by key and payload. + Deleting a topic is available, from the sidebar or with `DROP TOPIC `. The request goes to the cluster controller, which accepts it and removes the log directories afterwards, so the topic can still appear in the list for a moment. Truncate is not offered: Kafka removes records by diff --git a/features/data-files.mdx b/features/data-files.mdx index a05aba6f..61f871b7 100644 --- a/features/data-files.mdx +++ b/features/data-files.mdx @@ -41,7 +41,9 @@ When a guess is wrong, choose **Edit > Data > File Properties…** to set the de ## Filter, search and sort -`Cmd+Shift+F` shows the filter bar. It is the filter bar a table tab uses, run over the file instead of a database: all 18 operators, **Match all** or **Match any**, a checkbox per row, **Match Case**, and saved presets. It has no raw SQL row. See [Filtering](/features/filtering) for how each operator reads a value. +`Cmd+Shift+F` shows the filter bar. It is the filter bar a table tab uses, run over the file instead of a database: all 18 operators, **Match all** or **Match any**, a checkbox per row, **Match Case**, and saved presets. See [Filtering](/features/filtering) for how each operator reads a value. + +There is no raw SQL row to add, but presets are shared with table tabs, so a preset can bring in a raw SQL row or a row on a column the file lacks. **Apply** refuses either one with `This file cannot filter rows with these conditions.` in the status bar, and the rows stay as they were. Delete that row, or pick one of the file's columns for it. A running filter stops with the same message when the file no longer has its column, after switching the header row for instance. A comparison is numeric whenever the cell and the value both read as numbers, so `> 50` keeps `100` and drops `9`. Anything else compares as text. A CSV cell is never NULL, so **is NULL** matches nothing and **is empty** matches blank cells. In JSON, a `null` value and a missing key are both NULL. diff --git a/features/filtering.mdx b/features/filtering.mdx index a26d2051..e557230d 100644 --- a/features/filtering.mdx +++ b/features/filtering.mdx @@ -21,6 +21,8 @@ Each row has a drag grip, a checkbox, a column picker, an operator, a value fiel | Row grip, or right-click > **Move Up** / **Move Down** | Reorders the list. Order never changes the result | | ⋯ > **Remove All Filters** | Deletes every saved row for this table | +An edit to a row waits for **Apply** or `Enter`. Until then, turning a page, sorting, refreshing or counting rows reruns the filter that last ran, not the edited rows. + Filters are saved per connection, database, schema, and table, and survive a relaunch, unchecked rows and rows you never applied included. **Clear** keeps the rows and stops filtering, so they come back when you reopen the table. A table with an active filter opens in a new tab rather than replacing the current one. @@ -64,7 +66,7 @@ Eighteen of them, and the menu shows the SQL each one produces. ## Case sensitivity -Contains, not contains, starts with, and ends with ignore case. Equals, not equals, IN, NOT IN, and regex respect it. Open the operator menu and use **Match Case** to flip either one for that row; an `Aa` badge marks a row that is not on its usual setting. +Contains, not contains, starts with, and ends with ignore case. Equals, not equals, IN, NOT IN, and regex respect it. Open the operator menu and use **Match Case** to flip either one for that row; an `Aa` badge marks a row that is not on its usual setting. Picking another operator returns the row to that operator's usual setting. On MySQL, MariaDB, SQL Server, SQLite, libSQL, and Cloudflare D1 the column's collation decides, and no query can override it, so **Match Case** is dimmed. Their default collations already ignore case. Cassandra and Redis have no case-insensitive matching at all, so it is dimmed there too. @@ -113,18 +115,24 @@ Rows sharing an array and set to **same element** group together, and **Match al ## Raw SQL -A new row starts in raw SQL, unless **Default Column** in the settings says otherwise, and picking a column from its picker switches it to column mode. Type any WHERE condition: +A new row starts in raw SQL, unless **Default Column** in the settings says otherwise. Type one WHERE condition: ```sql created_at > NOW() - INTERVAL 7 DAY ``` -Autocomplete offers the table's columns and SQL keywords, after AND and OR included, on the same rules as the [query editor](/features/autocomplete): a typed character opens it, so does a dot and a `::` cast, and a position where the whole column list would be noise stays shut. Nothing in the list is selected until `Up` or `Down` selects it, so `Return` applies the filter. Once a suggestion is selected, `Return` or `Tab` inserts it. `Escape` dismisses the list without closing the filter bar. On a database that does not speak SQL the row is labeled **Raw Filter** and takes that database's own syntax: on MongoDB, a filter document such as `{"customer.country": "US"}`. +One condition means no comment, no second statement, and every quote and parenthesis closed. **Apply** refuses anything else with `A raw SQL filter must be one condition: no comment, no second statement, and every quote and parenthesis closed.` and the rows on screen stay as they were. -The text goes into the WHERE clause as written. A condition whose syntax does not match the database fails the query. +A condition that passes that check runs as written. Syntax the database does not accept fails the query. +Autocomplete offers the table's columns and SQL keywords, after AND and OR included, on the same rules as the [query editor](/features/autocomplete): a typed character opens it, so does a dot and a `::` cast, and a position where the whole column list would be noise stays shut. Nothing in the list is selected until `Up` or `Down` selects it, so `Return` applies the filter. Once a suggestion is selected, `Return` or `Tab` inserts it. `Escape` dismisses the list without closing the filter bar. + +The column picker moves a row between raw SQL and a column, or from one column to another, and the text stays exactly as you typed it. Type `paid` into a new row, then pick `status`, and the row compares `status` with `paid`. + +On a database that does not speak SQL the row is labeled **Raw Filter** and takes that database's own syntax: on MongoDB, a filter document such as `{"customer.country": "US"}`. etcd, DynamoDB, Memcached, Weaviate, InfluxDB and Kafka have no raw row, and [Kafka](/databases/kafka#limitations) cannot filter a topic at all. + ## Presets and settings Both live in the ⋯ menu. **Save as Preset…** stores the current rows, clicking a preset name loads it, and **Delete Preset** removes one.