acs::db::oracle method sql_function_argument_list (protected)
<instance of acs::db::oracle> sql_function_argument_list \ sql_info
Defined in packages/acs-tcl/tcl/acs-db-12-procs.tcl
Build interface based on bind vars and named parameters Oracle
- Parameters:
- sql_info (required)
- Testcases:
- No testcase defined.
Source code: set optional_parameters {} set arguments "" foreach argument_name [dict get $sql_info argument_names] defaulted [dict get $sql_info defaulted] type [dict get $sql_info types] { set argument_name [string tolower $argument_name] set argument_value [:dbfunction_argument_value -name $argument_name -type $type] if {$defaulted eq "Y"} { lappend optional_parameters $argument_name } else { lappend arguments "$argument_name => :$argument_value" } } # # We have to check at runtime if the arguments where provided # Missing: casts for optional parameters if {[llength $optional_parameters] > 0} { set tcl_code [ns_trim -delimiter | [string map [list @optional_parameters@ $optional_parameters] { |set __optional_parameters "" |foreach __var {@optional_parameters@} { | if {[info exists $__var]} { append __optional_parameters ",$__var => :$__var" } |} }]] set arguments [join $arguments ,]\$__optional_parameters } else { set tcl_code "" set arguments [join $arguments ,] } return [list tcl $tcl_code sql_arguments $arguments]XQL Not present: Generic, PostgreSQL, Oracle