xo::db::postgresql instproc get_all_package_functions (public)
<instance of xo::db::postgresql> get_all_package_functions
Defined in /var/www/openacs/packages/xotcl-core/tcl/05-db-procs.tcl
Load PostgreSQL package function argument metadata into the XOTcl database interface cache.
- Testcases:
- xotcl_core_tutorial_2
Source code: # # Load definitions in one step from function args; only for # those definitions where we do not have function args, we parse # the function arg aliases. # set definitions [::xo::dc list_of_lists get_all_package_functions0 { select args.function, args.arg_name, args.arg_default from acs_function_args args order by function, arg_seq }] set last_function "" set function_args {} foreach definition $definitions { lassign $definition function arg_name default if {$last_function ne "" && $last_function ne $function} { set ::xo::db::fnargs($last_function) $function_args #puts stderr "$last_function [list $function_args]" set function_args {} } lappend function_args [list $arg_name $default] set last_function $function } set ::xo::db::fnargs($last_function) $function_args #puts stderr "$last_function [list $function_args]" ns_log notice "loaded [array size ::xo::db::fnargs] definitions from function args" #ns_log notice "... [lsort [array names ::xo::db::fnargs *__*]]" # # Get all package functions (package name, object name) from PostgreSQL # system catalogs. # return [::xo::dc list_of_lists [self proc] { select distinct upper(substring(proname from 0 for position('__' in proname))) as package_name, upper(substring(proname from position('__' in proname)+2)) as object_name from pg_proc where strpos(proname,'__') > 1 }]XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)