Table of Contents
Data Editor - Filtering Keys
Data Editor has a powerful feature - FILTERS, which allows you to select a subset of keys of data stored in the KeyValue specifying simple search conditions.
This menu contains commands to add the filter and remove it. Let's look at each command in details.
Add Filter Row
This command adds the first row of filter or one more OR-row to existing filter. You can see green filter rows at the top of the grid.
In filter rows, you can define a search condition for a key. Valentina Studio combines all search conditions into RLIKE operator parameter to produce SQL query and executes it:
KEYVALUE K GET RLIKE( 'name' )
TIP: You can see RLIKE part of the result SQL query in the tooltip if you move the mouse cursor over the icon of filter row.
Inside of a single cell, you can write, for example, the following search condition to search for exact key name:
Add Filter Row with Cell Value
This command is kind of optimization. If you see value in the come cell, which you want to use for FILTER of keys, you can just click the cell and perform this command. You will see a new filter row with this value.
Note that filter is not applied yet. You will need to “Execute Filter” command.
Add 'RLIKE' Row
This command adds a special filter row in which you can define RLIKE clause of result SQL query yourself.
Note, that you can use only one of filters at the same time: a normal filter or a RLIKE-filter.
Filter by Cell Value
This command is even bigger optimisation than “Add Filter Row with Cell Value” because it does the same – adds a new filter row with the value of the cell, but also executes filter immediately.
This command removes the filter:
- green rows are removed from the table grid;
- all records of a table are displayed again.
Remove Last Filter Row
If you have added too many rows to a filter, you can use this command to remove the last row.
This command executes SQL query using the filter conditions and displays only records that satisfy them.
Filter to SQL
This command allows you to get SQL query, which is used by the current filter. SQL Editor with the corresponding query will be opened.
This feature gives you one more way to construct SQL query step by step for future use in your application code.