Help › Work with results
Sort and filter results
Sort a result by a column, filter its rows as you type or by one value, and have the database sort all rows when not every row is loaded.
Querlyn 0.1.0 is not released yet. This help describes it ahead of release.
Sorting and filtering in the results pane work on the rows that are loaded, without running the statement again. When a result is only partly loaded, Querlyn can ask the database to sort all of it.
Sort by a column
Click the column's header: once for ascending, again for descending, a third time to go back to the order the rows arrived in. An arrow in the header shows the direction, and the line above the grid names the sort.
In a table tab, a click on a header sorts every row of the table instead, through its ORDER BY field; see Open a table's rows.
The same is in the header's right-click menu, and as commands for the column the cursor is in: , and Clear Sort ().
How values are ordered:
- NULLs come last when ascending and first when descending.
- Numbers are compared by value and exactly; dates and times by the moment they stand for.
- Text is compared character by character, so capital letters come before small ones.
A result is sorted by one column at a time.
Sort all rows on the server
When not every row is loaded, sorting the loaded ones can mislead: the
largest value you see is only the largest so far. While a sort is in
effect, the line above the grid offers Sort All Rows on Server. It
runs the statement again with an ORDER BY for your sort added, so the
database does the sorting and the first rows you get are the first rows of
everything.
You can also right-click a header and choose or , or use .
- The statement runs again, with the same parameter values, without asking for them.
- It is offered only for a statement that just reads. For others the button is disabled and its tooltip says why.
Filter as you type
- Choose Filter… in the bar above the grid, or press ⌘F on macOS or Ctrl+F on Windows and Linux while the results have the keyboard ().
- Type. The grid shows only the loaded rows in which some column contains what you typed. Upper and lower case do not matter.
- Press ↩ on macOS or Enter on Windows and Linux to keep the filter and go back to the grid, or ⎋ on macOS or Esc on Windows and Linux to clear it.
The line above the grid says how many rows are shown out of how many are loaded. Very long values are searched in their first thousand characters.
Show only rows with one value
Right-click a cell and choose Filter by This Value (). The grid keeps the loaded rows whose value in that column is exactly the same: NULL matches NULL, and text must match in upper and lower case too.
You can set one such filter per column; they combine with each other and with the typed filter.
In a table tab, Filter by This Value adds the value to the tab's WHERE field instead and reads the table again, so every row of the table is filtered; see Open a table's rows.
Clear filters
Choose Clear Filter in the line above the grid, or . It removes every filter. ⎋ on macOS or Esc on Windows and Linux in the filter field removes only the typed text.
What filters do not do
A filter never changes which rows the database returns: rows that are not
loaded yet are not looked at. To filter everything, put the condition in
the statement's WHERE clause and run it again.
Sorting and filtering use the values as they were fetched. A cell you have edited but not applied is sorted by its old value.
Help for Querlyn 0.1.0. All help topics