xowiki::FormPage proc compute_filter_clauses (public)

 xowiki::FormPage[i] compute_filter_clauses [ -unless unless ] \
    [ -where where ]

Defined in packages/xowiki/tcl/xowiki-procs.tcl

Compute from "-unless" or "-where" specs the "tcl", "sql" and optional "hstore" query fragments.

Switches:
-unless
(optional)
-where
(optional)
Returns:
dict containing "init_vars", "uc" (unless clauses) and "wc" (where clauses)

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_composite_test_item create_composite_test_item (test xowf) xowiki::FormPage proc compute_filter_clauses xowiki::FormPage proc compute_filter_clauses test_create_composite_test_item->xowiki::FormPage proc compute_filter_clauses

Testcases:
create_composite_test_item
Source code:

set init_vars [list]
set uc {tcl false h "" vars "" sql ""}
if {[info exists unless]} {
  set uc [dict merge $uc [:filter_expression $unless ||]]
  set init_vars [list {*}$init_vars {*}[dict get $uc vars]]
}
set wc {tcl true h "" vars "" sql ""}
if {[info exists where]} {
  set wc [dict merge $wc [:filter_expression $where &&]]
  set init_vars [list {*}$init_vars {*}[dict get $wc vars]]
}
return [list init_vars $init_vars uc $uc wc $wc]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: