nsmcp::AccessRecordStoreSQLite method filters (protected)

 <instance of nsmcp::AccessRecordStoreSQLite[i]> filters options

Defined in /usr/local/ns/tcl/nsmcp/log-traffic-record-store.tcl

Parameters:
options (required)

Testcases:
No testcase defined.
Source code:
set from [dict get $options from]; set to [dict get $options to]
set context "kind=0 AND t>=[${:db} quote $from] AND t<[${:db} quote $to]"
foreach {key column} {pool pool method method recordSource source} {
    set value [dict get $options $key]
    if {$value ne {} && !($key eq "recordSource" && $value eq "all")} {append context " AND $column=[${:db} quote $value]"}
}
set literal [dict get $options pathLiteral]
if {$literal ne {}} {append context " AND instr(path,[${:db} quote $literal])>0"}
set selected $context
set status [dict get $options status]; set class [dict get $options statusClass]
if {$status ne {}} {append selected " AND status=[${:db} quote $status]"}
if {$class eq "4xx/5xx"} {append selected " AND status>=400"} elseif {$class ne {}} {set low [expr {[string index $class 0]*100}]; append selected " AND status>=$low AND status<$low+100"}
return [list $context $selected]
if {${:mode} eq "reader"} {${:db} execute {PRAGMA query_only=ON}}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: