nsmcp::AccessRecordStoreSQLite method stateGet (public)
<instance of nsmcp::AccessRecordStoreSQLite> stateGet key \ [ default ]
Defined in /usr/local/ns/tcl/nsmcp/log-traffic-record-store.tcl
Read a named control-state value. Return the stored Tcl representation without interpreting its contents. Use the supplied default when the key is absent.
- Parameters:
- key (required)
- Control-state key.
- default (optional)
- Value to return when the key does not exist.
- Returns:
- The stored state value or the supplied default.
- Testcases:
- No testcase defined.
Source code: set rows [${:db} execute {SELECT value FROM main.state WHERE key=:key}] return [expr {$rows eq {} ? $default : [dict get [lindex $rows 0] value]}]XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)