SET ROWFILTER
Contents
Purpose
Enable/disable row filters or set a row filter for the current table
Syntax
SET ROWFILTER TO [<condition>]
SET ROWFILTER ON | OFF | (<expL>)
See Also
FILTER(), Guide to the Users Workspace (Video), MD5(), SET FILTER, SYSDATAMASKS, SYSPERMS, SYSROLES, SYSROWFILTERS, System Tables, USERDATAMASK(), USERDOMAIN(), USEREMAIL(), USERNAME(), USERROLES(), USERROWFILTER(), Users and Roles, Users Tables
Description
If SET ROWFILTER TO <condition> is specified, records that do not satisfy the specified <condition> are automatically secluded. If SET ROWFILTER TO is specified, without a <condition>, the current row filter is removed allowing all records to be accessed. The SET ROWFILTER command enables or disables row filters. By default, ROWFILTER is OFF.
This allows for the testing of authenticated user Row level Security (RLS) row filters.
Supported from Lianja v3.4.
Example
open database southwind use customers set rowfilter on set rowfilter to country = "Germany" // List records where country = "Germany" list set rowfilter off // List all records list set rowfilter to country = "Mexico" // List records where country = "Mexico" list set rowfilter to // List all records list