xo::db::DB-postgresql instproc list_of_lists

 <instance of xo::db::DB-postgresql[i]> list_of_lists

Defined in

Partial Call Graph (max 5 caller/called nodes):
%3 test_xotcl-core xotcl-core (test ) xo::db::DB-postgresql instproc list_of_lists xo::db::DB-postgresql instproc list_of_lists test_xotcl-core->xo::db::DB-postgresql instproc list_of_lists test_xotcl_core_tutorial_2 xotcl_core_tutorial_2 (test ) test_xotcl_core_tutorial_2->xo::db::DB-postgresql instproc list_of_lists test_xotcl_core_tutorial_3 xotcl_core_tutorial_3 (test xotcl-core) test_xotcl_core_tutorial_3->xo::db::DB-postgresql instproc list_of_lists acs::icanuse acs::icanuse (public) xo::db::DB-postgresql instproc list_of_lists->acs::icanuse db_getrow db_getrow (private) xo::db::DB-postgresql instproc list_of_lists->db_getrow db_with_handle db_with_handle (public) xo::db::DB-postgresql instproc list_of_lists->db_with_handle

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 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 $result
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: