Difference between revisions of "SET ROWFILTER"
Yvonne.milne (Talk | contribs) (Created page with "''Under construction'' ==Purpose== ==Syntax== SET ROWFILTER TO [<condition>] SET ROWFILTER ON | OFF | (<expL>) ==See Also== DATAMASK(), FILTER(), MD5(), ROWF...") |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
==Purpose== | ==Purpose== | ||
− | + | Enable/disable row filters or set a row filter for the current table | |
==Syntax== | ==Syntax== | ||
Line 10: | Line 9: | ||
==See Also== | ==See Also== | ||
[[DATAMASK()]], [[FILTER()]], [[MD5()]], [[ROWFILTER()]], [[SET FILTER]], [[SYSDATAMASKS]], [[SYSPERMS]], [[SYSROLES]], [[SYSROWFILTERS]], [[:Category:System Tables|System Tables]], [[Users and Roles]], [[Guide to the Users Workspace (Video)]] | [[DATAMASK()]], [[FILTER()]], [[MD5()]], [[ROWFILTER()]], [[SET FILTER]], [[SYSDATAMASKS]], [[SYSPERMS]], [[SYSROLES]], [[SYSROWFILTERS]], [[:Category:System Tables|System Tables]], [[Users and Roles]], [[Guide to the Users Workspace (Video)]] | ||
− | |||
==Description== | ==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. | Supported from Lianja v3.4. | ||
Line 19: | Line 19: | ||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
+ | 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 | ||
</code> | </code> | ||
Revision as of 12:24, 23 February 2017
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
DATAMASK(), FILTER(), MD5(), ROWFILTER(), SET FILTER, SYSDATAMASKS, SYSPERMS, SYSROLES, SYSROWFILTERS, System Tables, Users and Roles, Guide to the Users Workspace (Video)
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