_acs-tcl__db__list_variants (private)
_acs-tcl__db__list_variants
Defined in packages/acs-tcl/tcl/test/db-proc-test-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set _aa_export {} set body_count 1 foreach testcase_body {{ foreach cmd {db_list db_list_of_lists} { set r [$cmd x {select object_id from acs_objects where object_id = -1}] aa_true "$cmd constant query" {$r == -1} set x -1 set r [$cmd x {select object_id from acs_objects where object_id = :x}] aa_true "$cmd query with bind variable from environment" {$r == -1} set r [$cmd x {select object_id from acs_objects where object_id = :a} -bind {a -1}] aa_true "$cmd query with provided bind variable from var list" {$r == -1} set s [ns_set create binds b -1] set r [$cmd x {select object_id from acs_objects where object_id = :b} -bind $s] aa_true "$cmd query with provided bind variable from ns_set" {$r == -1} } # # Test combinations of "-columns_var" and "-with_headers" of db_list_of_lists # foreach {optionSet expected} { {} {1 0} {-columns_var __cols} {1 1} {-with_headers} {2 0} {-columns_var __cols -with_headers} {2 1} } { set r [db_list_of_lists {*}$optionSet ..x { select object_id, package_id from acs_objects where object_id = -1 }] aa_equals "db_list_of_lists $optionSet" [list [llength $r] [info exists __cols]] $expected unset -nocomplain __cols } }} { aa_log "Running testcase body $body_count" set ::__aa_test_indent [info level] set catch_val [catch $testcase_body msg] if {$catch_val != 0 && $catch_val != 2} { aa_log_result "fail" "db__list_variants (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle