_acs-tcl__acs_db__postgresql_stub_arity (private)

 _acs-tcl__acs_db__postgresql_stub_arity

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

Partial Call Graph (max 5 caller/called nodes):
aa_equals aa_equals (public) aa_log aa_log (public) aa_log_result aa_log_result (public) db_driverkey db_driverkey (public) _acs-tcl__acs_db__postgresql_stub_arity _acs-tcl__acs_db__postgresql_stub_arity _acs-tcl__acs_db__postgresql_stub_arity->aa_equals _acs-tcl__acs_db__postgresql_stub_arity->aa_log _acs-tcl__acs_db__postgresql_stub_arity->aa_log_result _acs-tcl__acs_db__postgresql_stub_arity->db_driverkey

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
        if {[db_driverkey ""] ne "postgresql"} {
            aa_log "PostgreSQL test"
            return
        }

        try {
            ::acs::dc transaction {
                ::acs::dc get_value dbqd..NULL {
                    select define_function_args('aa_stub_arity__probe','value')
                }
                ::acs::dc dml dbqd..NULL {
                    create function pg_temp.aa_stub_arity__probe(value integer, extra integer)
                    returns integer language sql as 'select $1'
                }
                ::acs::dc dml dbqd..NULL {
                    create function pg_temp.aa_stub_arity__probe()
                    returns integer language sql as 'select 0'
                }

                set matches {}
                foreach entry [::acs::dc get_all_package_functions] {
                    if {[lrange $entry 0 1] eq {AA_STUB_ARITY PROBE}} {
                        lappend matches [dict get [lindex $entry 2] types]
                    }
                }
                aa_equals "Other arities cannot supply a stub" $matches {}

                ::acs::dc dml dbqd..NULL {
                    create function pg_temp.aa_stub_arity__probe(value text)
                    returns text language sql as 'select $1'
                }
                set matches {}
                foreach entry [::acs::dc get_all_package_functions] {
                    if {[lrange $entry 0 1] eq {AA_STUB_ARITY PROBE}} {
                        lappend matches [dict get [lindex $entry 2] types]
                    }
                }
                aa_equals "The exact arity supplies the stub" $matches {text}

                error "Rollback test fixtures" "" {OPENACS TEST ROLLBACK}
            }
        } trap {OPENACS TEST ROLLBACK} {} {
            # Expected rollback.
        }
    }} {
          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" "acs_db__postgresql_stub_arity (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: