acs::db::oracle method get_all_package_functions (public)
<instance of acs::db::oracle> get_all_package_functions \ [ -dbn dbn ]
Get all package functions (package name, object name) from Oracle system catalogs. The resulting list contains entries of the form: sqlpackage object {argument_names ... types ... defaulted ... result_type ....} Note that the method processes only the functions and procedures created by the current USER, which is in the default configuration the user "OPENACS". This way, we cover only these functions defined by OpenACS. This has a similar functionality like the "function_args" in PostgreSQL.
- Switches:
- -dbn (optional)
- Testcases:
- No testcase defined.
Source code: set last_func "" set result {} set d {argument_names "" types "" defaulted "" defaults "" result_type ""} foreach tuple [:list_of_lists -dbn $dbn dbqd..[current method] { select package_name, object_name, position, argument_name, data_type, defaulted from all_arguments where package_name is not null and owner = USER order by package_name, object_name, position }] { lassign $tuple package_name object_name position argument_name data_type defaulted set func $package_name.$object_name if {$func ne $last_func && $last_func ne ""} { lappend result [list [dict get $d package_name] [dict get $d object_name] $d] set last_func $func set d {argument_names "" types "" defaulted "" defaults "" result_type ""} } #ns_log notice "$func ($last_func): $position $argument_name $data_type" dict set d package_name $package_name dict set d object_name $object_name set last_func $func if {$position == 0} { dict set d result_type $data_type } else { dict lappend d types $data_type dict lappend d argument_names $argument_name dict lappend d defaulted $defaulted dict lappend d defaults [expr {$defaulted eq "Y" ? "null" : ""} ] } } if {$last_func ne ""} { lappend result [list [dict get $d package_name] [dict get $d object_name] $d] } return $resultXQL Not present: Generic, PostgreSQL, Oracle