xo::db::DB-postgresql instproc list_of_lists
<instance of xo::db::DB-postgresql> list_of_lists
- Testcases:
- xotcl_core_tutorial_2, xotcl-core, xotcl_core_tutorial_3
Source code: if {$sql eq ""} {set sql [:get_sql $qn]} if {$bind ne ""} {set bindOpt [list -bind $bind]} {set bindOpt ""} db_with_handle -dbn [:map_default_dbn $dbn] db { if {[info exists prepare]} {set sql [:prepare -handle $db -argtypes $prepare $sql]} set result {} set answers [uplevel [list ns_pg_bind select $db {*}$bindOpt $sql]] if {$with_headers} { if {[acs::icanuse "ns_set keys"]} { set headers [ns_set keys $answers] } else { set headers [dict keys [ns_set array $answers]] } set result [list $headers] } while { [db_getrow $db $answers] } { set row [list] foreach {att value} [ns_set array $answers] {lappend row $value} lappend result $row } ns_set free $answers } return $resultXQL Not present: Generic, PostgreSQL, Oracle