_acs-bootstrap-installer__db_map (private)
_acs-bootstrap-installer__db_map
Defined in packages/acs-bootstrap-installer/tcl/test/30-apm-load-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 {{ aa_log "Flush the pre-loaded query" set qn dbqd.acs-bootstrap-installer.tcl.test.30-apm-load-procs.test::acs_bootstrap_installer::db_map.full_query_2 nsv_unset OACS_FULLQUERIES $qn set xql_file [acs_root_dir]/packages/acs-bootstrap-installer/tcl/test/30-apm-load-procs.xql db_qd_load_query_file $xql_file errors aa_false "No errors loading '$xql_file'" [info exists errors] set qn dbqd.acs-bootstrap-installer.tcl.test.30-apm-load-procs.test::acs_bootstrap_installer::db_map.full_query_2 aa_true "Nsv was loaded with query from '$xql_file'" [nsv_get OACS_FULLQUERIES $qn value] set db_type [db_type] if {$db_type eq "postgresql"} { set expected [join { select 'test' as d, :bind_value as b 1 as c }] } elseif {$db_type eq "oracle"} { set expected [join { select 'test' as d, :bind_value as b 1 as c from dual }] } else { set expected "" } set result [join [::test::acs_bootstrap_installer::db_map full_query_1]] aa_equals "'$db_type' fetches full_query_1" $result $expected if {$db_type eq "postgresql"} { set expected {limit 1} } elseif {$db_type eq "oracle"} { set expected {WHERE ROWNUM <= 1} } else { set expected "" } set result [join [::test::acs_bootstrap_installer::db_map partial_query_1]] aa_equals "'$db_type' fetches partial_query_1" $result $expected set expected [join { select 'test' as d, :bind_value as b 1 as c from dual as generic }] set result [join [::test::acs_bootstrap_installer::db_map full_query_2]] aa_equals "'$db_type' fetches full_query_2" $result $expected set expected {fetch first 1 rows only} set result [join [::test::acs_bootstrap_installer::db_map partial_query_2]] aa_equals "'$db_type' fetches partial_query_2" $result $expected }} { 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_map (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }Generic XQL file: packages/acs-bootstrap-installer/tcl/test/30-apm-load-procs.xql
PostgreSQL XQL file: packages/acs-bootstrap-installer/tcl/test/30-apm-load-procs-postgresql.xql
Oracle XQL file: packages/acs-bootstrap-installer/tcl/test/30-apm-load-procs-oracle.xql