nsmcp::DatabaseSession method execute (public)

 <instance of nsmcp::DatabaseSession[i]> execute \
    [ -arrayName arrayName ] [ -script script ] sql

Defined in /usr/local/ns/tcl/nsmcp/database.tcl

Execute trusted SQL statements with bindings from the caller's scope. Materialize ns_set rows directly as alternating key/value lists, or run the row callback through the supplied caller array; always flush result sets.

Switches:
-arrayName (optional)
Optional caller-array name populated for each fetched row.
-script (optional)
Tcl script executed in the documented caller or callback context.
Parameters:
sql (required)
Trusted SQL text; current values are resolved in the caller's scope.
Returns:
The collected row lists, or an empty list when rows are consumed through a callback.

Testcases:
No testcase defined.
[ show source ]
Show another procedure: