• Publicity: Public Only All

acs-db-12-procs.tcl

Low level interface for defining interface stubs to application specific DB functions.

This file defines the following Objects and Classes: ::acs::db::postgresql[i], ::acs::db::nsdb-oracle[i], ::acs::db::SQL[i], ::acs::db::nsdbi-postgresql[i], ::acs::db::oracle[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::nsdb-oracle[i], ::acs::db::nsdbi-postgresql[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::nsdb-oracle[i], ::acs::db::nsdbi-postgresql[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::nsdb-oracle[i], ::acs::db::nsdbi-postgresql[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::SQL[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::nsdb-oracle[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::nsdbi-postgresql[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::nsdbi-postgresql[i], ::acs::db::SQL[i], ::acs::db::nsdbi-postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::nsdb-oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::nsdb-oracle[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::nsdb-oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::nsdb-oracle[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::nsdb-oracle[i], ::acs::db::nsdbi-postgresql[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::nsdb-oracle[i], ::acs::db::nsdbi-postgresql[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::nsdb-oracle[i], ::acs::db::nsdbi-postgresql[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::nsdb-oracle[i], ::acs::db::nsdbi-postgresql[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::oracle[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::SQL[i], ::acs::db::nsdb-oracle[i], ::acs::db::nsdbi-postgresql[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::oracle[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i], ::acs::db::postgresql[i]

Location:
packages/acs-tcl/tcl/acs-db-12-procs.tcl
Created:
2022-02-07
Author:
Gustaf Neumann

Procedures in this file

Detailed information

Class ::acs::db::SQL (public)

 ::nx::Class ::acs::db::SQL[i]

Generic superclass for all SQL dialects.

Testcases:
No testcase defined.

Class ::acs::db::nsdb-oracle (public)

 ::nx::Class ::acs::db::nsdb-oracle[i]

Oracle backend for nsdb driver

Testcases:
No testcase defined.

Class ::acs::db::nsdbi-postgresql (public)

 ::nx::Class ::acs::db::nsdbi-postgresql[i]

PostgreSQL backend for nsdbi driver

Testcases:
No testcase defined.

Class ::acs::db::oracle (public)

 ::nx::Class ::acs::db::oracle[i]

Support class for backend based on Oracle, i.e., the Oracle dialect of SQL).. This class can be used with the nsdb and the nsdbi drivers of NaviServer.

Testcases:
No testcase defined.

Class ::acs::db::postgresql (public)

 ::nx::Class ::acs::db::postgresql[i]

Support class for backend based on PostgreSQL, i.e., the PostgreSQL dialect of SQL). This class can be used with the nsdb and the nsdbi drivers of NaviServer.

Testcases:
No testcase defined.

acs::db::SQL method create_db_function_interface (public)

 <instance of acs::db::SQL[i]> create_db_function_interface \
    [ -dbn dbn ] [ -match match ] [ -verbose ]

Obtain all function definitions from the DB and turn these into callable Tcl methods like the following examples: ::acs::dc call content_type drop_type -content_type ::xowiki::FormInstance ::acs::dc call content_folder delete -folder_id $root_folder_id -cascade_p 1 In the Oracle-biased terminology such calls are defined in terms of a "package_name" and an "object_name": ::acs::dc call /package_name/ /object_name/ ?/args/?

Switches:
-dbn (optional)
-match (optional, defaults to "*")
-verbose (optional)

Testcases:
No testcase defined.

acs::db::oracle method get_all_package_functions (public)

 <instance of acs::db::oracle[i]> 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.

acs::db::oracle method map_function_name (public)

 <instance of acs::db::oracle[i]> map_function_name sql

Replace calls to function names in provided SQL (replace "package__object" by "package.object").

Parameters:
sql (required)

Testcases:
No testcase defined.

acs::db::postgresql method get_all_package_functions (public)

 <instance of acs::db::postgresql[i]> get_all_package_functions \
    [ -dbn dbn ]

PostgreSQL version of obtaining information about the procedures and functions stored in the DB. For PostgreSQL, we keep this in the table "function_args". The information from "acs_function_args" defines, for which functions we want to create an interface. The information is completed with the definitions from the system catalog of PostgreSQL. The resulting list contains entries of the form: sqlpackage object {argument_names ... types ... defaulted ... defaults result_type ....} Currently, "defaults" are only available for PostgreSQL

Switches:
-dbn (optional)

Testcases:
No testcase defined.

acs::db::postgresql method map_function_name (public)

 <instance of acs::db::postgresql[i]> map_function_name sql

Replace calls to function names in provided SQL (dummy function for PostgreSQL)

Parameters:
sql (required)

Testcases:
No testcase defined.
[ show source ]