acs::db::nsdbi method list (public)

 <instance of acs::db::nsdbi[i]> list [ -dbn dbn ] [ -bind bind ] \
    [ -prepare prepare ] qn sql

Defined in packages/acs-tcl/tcl/acs-db-00-procs.tcl

Return a Tcl list, where each element contains just the first the column values of the tuples returned by the provided SQL query.

Switches:
-dbn (optional)
database identifier
-bind (optional)
optional bind variables for the SQL query
-prepare (optional)
not used for NSDBI, providing interface compatibility with NSDB
Parameters:
qn (required)
name of the SQL query
sql (required)
SQL query

Testcases:
No testcase defined.
Source code:
if {$sql eq ""} {
    set sql [:get_sql $qn]
}
set dbn [:map_default_dbn $dbn]
set flat [:uplevel [list ::dbi_rows -columns __columns  {*}[expr {$dbn ne "" ? [list -db $dbn] : ""}]  {*}[expr {$bind ne "" ? [list -bind $bind] : ""}]  -- $sql]]
if {[:uplevel {llength $__columns}] > 1} {
    error "query is returning more than one column"
}
return $flat
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: