_acs-tcl__db__1row (private)

 _acs-tcl__db__1row

Defined in packages/acs-tcl/tcl/test/db-proc-test-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_equals aa_equals (public) aa_false aa_false (public) aa_log aa_log (public) aa_log_result aa_log_result (public) aa_true aa_true (public) _acs-tcl__db__1row _acs-tcl__db__1row _acs-tcl__db__1row->aa_equals _acs-tcl__db__1row->aa_false _acs-tcl__db__1row->aa_log _acs-tcl__db__1row->aa_log_result _acs-tcl__db__1row->aa_true

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
        set cmd db_1row

        set r [$cmd x {select object_id from acs_objects where object_id = -1}]
        aa_true "$cmd returns variable" {[info exists object_id]}
        unset object_id

        set x -1
        set r [$cmd x {select object_id from acs_objects where object_id = :x}]
        aa_true "$cmd returns variable bind variable from environment" {[info exists object_id]}
        unset object_id

        set r [$cmd x {select object_id from acs_objects where object_id = :a} -bind {a -1}]
        aa_true "$cmd with bind variable from var list returns variable" {[info exists object_id]}
        unset object_id

        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 with provided bind variable from ns_set returns variable" {[info exists object_id]}
        unset object_id

        set s [ns_set create binds b -1]
        set r [$cmd x {select object_id from acs_objects where object_id = :b} -bind $s -column_array arr]
        aa_true "$cmd returns column_array" {[array exists arr]}
        aa_equals "$cmd returns column_array value" [array get arr] "object_id -1"
        aa_false "$cmd returns variable" {[info exists object_id]}
        array unset arr

        set s [ns_set create binds b -1]
        set r [$cmd x {select object_id from acs_objects where object_id = :b} -bind $s -column_set n]
        aa_equals "$cmd returns column_ns_set value" [ns_set array $n"object_id -1"
        aa_false "$cmd returns variable" {[info exists object_id]}
    }} {
          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__1row (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: