template::query::onevalue (private)
template::query::onevalue statement_name db result_name sql
Defined in packages/acs-templating/tcl/query-procs.tcl
Process a onevalue query. Use a single array to store the results.
- Parameters:
- statement_name (required)
- Standard db_api statement name used to hook into query dispatcher
- db (required)
- Database handle
- result_name (required)
- Tcl variable name to use when setting the result
- sql (required)
- Query to use when processing this command
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: upvar opts opts upvar $opts(uplevel) $result_name result set result "" set row [db_exec 0or1row $db $statement_name $sql 3] if { $row ne "" } { # Set the result in the calling frame. set result [ns_set value $row 0] if { [info exists opts(cache)] } { set opts(result) $result } }XQL Not present: Generic, PostgreSQL, Oracle