Filtering
TablePro provides a visual filter builder, quick search, and saved presets to help you find exactly the data you need. Build complex WHERE clauses without writing SQL, or drop into raw SQL mode for full control.
Overview
The filtering system consists of several components:
- Filter Panel — a visual builder for constructing WHERE clause conditions
- Quick Search — instant search across all visible columns
- Filter Presets — save and load named filter configurations
- SQL Preview — see the generated WHERE clause before applying
- Per-Tab State — each tab remembers its own filters independently
Filter Panel
Opening the Filter Panel
Toggle the filter panel visibility:
- Click the Filter button in the toolbar
- Or use the keyboard shortcut
Cmd+F
The panel appears above the data grid area, pushing it down. The quick search field is automatically focused when the panel opens.
Building Filters
Each filter row consists of three parts:
- Column — select which column to filter on
- Operator — choose the comparison operator
- Value — enter the value to compare against
Adding and Managing Filters
| Action | How |
|---|
| Add a filter | Click the + button in the header |
| Duplicate a filter | Click the duplicate icon on the filter row |
| Remove a filter | Click the x button on the filter row |
| Focus a filter | Click anywhere on the row |
AND / OR Logic
Toggle between AND and OR logic using the segmented control in the filter header:
- AND — all filters must match (intersection)
- OR — any filter can match (union)
Use AND mode to narrow results progressively. Use OR mode when looking for rows that match any of several conditions.
Selecting and Applying Filters
Each filter row has a checkbox for selective application:
| Action | Description |
|---|
| Select/deselect | Toggle the checkbox on individual filters |
| Select All | Use the “Select All” checkbox in the footer |
| Apply single | Click the play button on a filter row to apply just that filter |
| Apply All | Click Apply All in the footer to apply all selected filters |
| Unset | Click Unset to clear all applied filters and reload unfiltered data |
Only valid filters with complete column, operator, and value (where required) can be applied. Invalid filters show a disabled play button.
Operators
The filter builder supports 18 operators to cover all common comparison needs.
| Operator | Display Name | Requires Value | Description |
|---|
= | equals | Yes | Exact match |
!= | not equals | Yes | Excludes exact match |
| CONTAINS | contains | Yes | Substring match (LIKE %value%) |
| NOT CONTAINS | not contains | Yes | Excludes substring |
| STARTS WITH | starts with | Yes | Prefix match (LIKE value%) |
| ENDS WITH | ends with | Yes | Suffix match (LIKE %value) |
> | greater than | Yes | Greater than comparison |
>= | greater or equal | Yes | Greater than or equal |
< | less than | Yes | Less than comparison |
<= | less or equal | Yes | Less than or equal |
| IS NULL | is NULL | No | Column value is NULL |
| IS NOT NULL | is not NULL | No | Column value is not NULL |
| IS EMPTY | is empty | No | Column value is empty string |
| IS NOT EMPTY | is not empty | No | Column value is not empty string |
| IN | in list | Yes | Value in comma-separated list |
| NOT IN | not in list | Yes | Value not in comma-separated list |
| BETWEEN | between | Yes (two values) | Value between two bounds |
| REGEX | matches regex | Yes | Regular expression match |
Operators Without Values
When you select IS NULL, IS NOT NULL, IS EMPTY, or IS NOT EMPTY, the value field is hidden and replaced with a dash indicator. No input is needed.
BETWEEN Operator
When BETWEEN is selected, two value fields appear with an “and” label between them. Both values are required.
IN / NOT IN Operators
Enter comma-separated values to match against a list:
Raw SQL Mode
For conditions the visual builder cannot express, use Raw SQL mode.
Using Raw SQL
- Click the column dropdown on a filter row
- Select Raw SQL at the top of the list
- The operator dropdown disappears and the value field becomes a free-text SQL input
- Type your WHERE clause condition directly
Examples:
created_at > NOW() - INTERVAL 7 DAY
LOWER(name) LIKE '%smith%' AND status IN ('active', 'pending')
Raw SQL is injected directly into the WHERE clause. Ensure your syntax is correct for the connected database type.
Quick Search
Quick Search provides instant filtering across all visible columns without building individual filter rows.
Using Quick Search
- Open the filter panel
- Type in the Quick search across all columns… field
- Press
Enter to apply the search
Quick search is always visible when the filter panel is open. Click the x button to clear the search.
Quick Search is ideal for ad-hoc lookups. For recurring filter patterns, save them as a preset instead.
Filter Presets
Save your current filter configuration as a named preset for quick reuse.
Saving a Preset
- Build your filters in the filter panel
- Click the folder icon in the filter header
- Select Save as Preset…
- Enter a name and click Save
Loading a Preset
- Click the folder icon in the filter header
- Select a preset from the dropdown menu
- The saved filters replace the current filter list
Managing Presets
| Action | How |
|---|
| Load | Click the preset name in the folder menu |
| Delete | Select Delete Preset > click the preset name |
| Overwrite | Save a new preset with the same name |
Presets are stored via UserDefaults and persist across sessions.
Presets save the filter definitions (column, operator, value) but not whether they were applied. After loading a preset, click Apply All to activate the filters.
SQL Preview
Preview the exact WHERE clause that will be sent to the database before applying.
Viewing the Preview
- Build your filters
- Click the SQL button in the filter footer
- A sheet displays the generated WHERE clause
What the Preview Shows
- The complete WHERE clause with proper quoting for your database type
- MySQL uses backticks (
`column`)
- PostgreSQL uses double quotes (
"column")
- AND/OR logic based on the current mode
- A “Copy” button to copy the SQL to clipboard
If some (but not all) filters are selected, the preview shows only the selected filters. Otherwise, it shows all valid filters.
Handling Invalid Filters
If filters exist but none are valid, the preview shows a helpful message indicating what needs to be completed:
- Select a column
- Enter a value (if required by the operator)
- Fill in the second value for BETWEEN
Per-Tab Filter State
Each tab in TablePro maintains its own independent filter state.
How It Works
- Opening a table creates a fresh filter state for that tab
- Switching between tabs preserves each tab’s filters
- Applied filters remain active when you switch away and return
- The filter panel visibility is remembered per tab
State Components
Each tab stores:
| Component | Description |
|---|
| Filter list | All filter rows (applied or not) |
| Applied filters | Currently active filters affecting the query |
| Panel visibility | Whether the filter panel is shown or hidden |
Filter Settings
Configure default filter behavior in the settings popover.
Accessing Settings
Click the gear icon in the filter panel header to open the settings popover.
Default Column
Controls which column is pre-selected when adding a new filter:
| Option | Description |
|---|
| Raw SQL | New filters default to Raw SQL mode |
| Primary Key | New filters default to the table’s primary key column |
| Any Column | New filters default to the first available column |
Default Operator
Controls which operator is pre-selected when adding a new filter:
| Option | Description |
|---|
| Equal (=) | Default to exact match |
| Contains | Default to substring match |
Panel State on Open
Controls the filter panel behavior when opening a table:
| Option | Description |
|---|
| Always Hide | Filter panel starts hidden (default) |
| Always Show | Filter panel is always visible when opening a table |
| Restore Last Filter | Restores the last filters used on that specific table |
The “Restore Last Filter” option remembers filters per table name. If you frequently filter the same table with the same conditions, this saves setup time every session.
Keyboard Shortcuts
| Action | Shortcut |
|---|
| Toggle filter panel / Quick search | Cmd+F |
| Apply filter (in value field) | Enter |
Next Steps