acs::db::SQL method dbfunction_to_tcl (protected)
<instance of acs::db::SQL> dbfunction_to_tcl [ -verbose ] \ package_name object_name sql_info
Defined in packages/acs-tcl/tcl/acs-db-12-procs.tcl
This method compiles a stored procedure into proc using a classic nonpositional argument style interface.
- Switches:
- -verbose (optional)
- Parameters:
- package_name (required)
- object_name (required)
- sql_info (required)
- Testcases:
- No testcase defined.
Source code: if {$sql_info eq ""} { return } # # Probably, we have to adjust the result type handling for Oracle. # set result_type [dict get $sql_info result_type] if {$result_type ne "" && $result_type ni [:expected_result_types]} { ns_log notice "??? ${package_name}__$object_name has unhandled result: $result_type" #return } set nonposarg_list [list [list -dbn ""]] lappend nonposarg_list {*}[:build_function_argument_list $sql_info] set body [:build_stub_body $package_name $object_name $sql_info] # # Define the methods based on the backend. Hopefully this is # sufficient, and we do not need definitions based on the # driver as well. # set body_prefix "\n # Automatically generated method\n" set cmd [list ::acs::db::${:driver}-${:backend} public method "call ${package_name} $object_name" $nonposarg_list "$body_prefix$body" ] if {$verbose} { ns_log notice FINAL=$cmd } {*}$cmdXQL Not present: Generic, PostgreSQL, Oracle