- Publicity: Public Only All
acs-db-00-procs.tcl
Low level interface for defining the basic classes for the DB interface.
This file defines the following Objects and Classes: ::acs::db::nsdbi, ::acs::db::Driver, ::acs::db::nsdb, ::acs::db::Driver, ::acs::db::nsdb, ::acs::db::nsdb, ::acs::db::nsdbi, ::acs::db::nsdbi
- Location:
- packages/acs-tcl/tcl/acs-db-00-procs.tcl
- Created:
- 2022-02-07
- Author:
- Gustaf Neumann
Procedures in this file
- Class ::acs::db::Driver (public)
- Class ::acs::db::nsdb (public)
- Class ::acs::db::nsdbi (public)
- acs::db::Driver instproc 0or1row (protected)
- acs::db::Driver instproc 1row (protected)
- acs::db::Driver instproc dml (protected)
- acs::db::Driver instproc ds (protected)
- acs::db::Driver instproc foreach (protected)
- acs::db::Driver instproc get_sql (protected)
- acs::db::Driver instproc get_value (protected)
- acs::db::Driver instproc list (protected)
- acs::db::Driver instproc list_of_lists (protected)
- acs::db::Driver instproc map_default_dbn (protected)
- acs::db::Driver instproc prepare (protected)
- acs::db::Driver instproc qn (public)
- acs::db::Driver instproc row_lock (protected)
- acs::db::Driver instproc sets (protected)
- acs::db::Driver instproc transaction (protected)
- acs::db::nsdb instproc list (public)
- acs::db::nsdb instproc list_of_lists (public)
- acs::db::nsdbi instproc list (public)
- acs::db::nsdbi instproc list_of_lists (public)
- acs::db::require_dc (private)
Detailed information
Class ::acs::db::Driver (public)
::nx::Class ::acs::db::Driver
Abstract class of the database interface
- Testcases:
- No testcase defined.
Class ::acs::db::nsdb (public)
::nx::Class ::acs::db::nsdb
Database interface based on the nsdb driver of NaviServer
- Testcases:
- No testcase defined.
Class ::acs::db::nsdbi (public)
::nx::Class ::acs::db::nsdbi
Database interface based on the nsdbi driver of NaviServer
- Testcases:
- No testcase defined.
acs::db::Driver method 0or1row (protected)
<instance of acs::db::Driver> 0or1row [ -dbn dbn ] \ [ -bind bind ] [ -prepare prepare ] qn sql
- Switches:
- -dbn (optional)
- -bind (optional)
- -prepare (optional)
- Parameters:
- qn (required)
- sql (required)
- Testcases:
- No testcase defined.
acs::db::Driver method 1row (protected)
<instance of acs::db::Driver> 1row [ -dbn dbn ] [ -bind bind ] \ [ -prepare prepare ] qn sql
- Switches:
- -dbn (optional)
- -bind (optional)
- -prepare (optional)
- Parameters:
- qn (required)
- sql (required)
- Testcases:
- No testcase defined.
acs::db::Driver method dml (protected)
<instance of acs::db::Driver> dml [ -dbn dbn ] [ -bind bind ] \ [ -prepare prepare ] qn sql
- Switches:
- -dbn (optional)
- -bind (optional)
- -prepare (optional)
- Parameters:
- qn (required)
- sql (required)
- Testcases:
- No testcase defined.
acs::db::Driver method ds (protected)
<instance of acs::db::Driver> ds onOff
- Parameters:
- onOff (required)
- Testcases:
- No testcase defined.
acs::db::Driver method foreach (protected)
<instance of acs::db::Driver> foreach [ -dbn dbn ] \ [ -bind bind ] [ -prepare prepare ] qn sql script
- Switches:
- -dbn (optional)
- -bind (optional)
- -prepare (optional)
- Parameters:
- qn (required)
- sql (required)
- script (required)
- Testcases:
- No testcase defined.
acs::db::Driver method get_sql (protected)
<instance of acs::db::Driver> get_sql [ -dbn dbn ] qn
- Switches:
- -dbn (optional)
- Parameters:
- qn (required)
- Testcases:
- No testcase defined.
acs::db::Driver method get_value (protected)
<instance of acs::db::Driver> get_value [ -dbn dbn ] \ [ -bind bind ] [ -prepare prepare ] qn sql [ default ]
- Switches:
- -dbn (optional)
- -bind (optional)
- -prepare (optional)
- Parameters:
- qn (required)
- sql (required)
- default (optional)
- Testcases:
- No testcase defined.
acs::db::Driver method list (protected)
<instance of acs::db::Driver> list [ -dbn dbn ] [ -bind bind ] \ [ -prepare prepare ] qn sql
- Switches:
- -dbn (optional)
- -bind (optional)
- -prepare (optional)
- Parameters:
- qn (required)
- sql (required)
- Testcases:
- No testcase defined.
acs::db::Driver method list_of_lists (protected)
<instance of acs::db::Driver> list_of_lists [ -dbn dbn ] \ [ -bind bind ] [ -prepare prepare ] qn sql
- Switches:
- -dbn (optional)
- -bind (optional)
- -prepare (optional)
- Parameters:
- qn (required)
- sql (required)
- Testcases:
- No testcase defined.
acs::db::Driver method map_default_dbn (protected)
<instance of acs::db::Driver> map_default_dbn dbn
- Parameters:
- dbn (required)
- Testcases:
- No testcase defined.
acs::db::Driver method prepare (protected)
<instance of acs::db::Driver> prepare [ -handle handle ] \ [ -argtypes argtypes ] sql
- Switches:
- -handle (optional)
- -argtypes (optional)
- Parameters:
- sql (required)
- Testcases:
- No testcase defined.
acs::db::Driver method qn (public)
<instance of acs::db::Driver> qn query_name
Return fully qualified query name as used in OpenACS.
- Parameters:
- query_name (required)
- Testcases:
- No testcase defined.
acs::db::Driver method row_lock (protected)
<instance of acs::db::Driver> row_lock [ -dbn dbn ] \ [ -bind bind ] [ -for for ] [ -prepare prepare ] qn sql
- Switches:
- -dbn (optional)
- -bind (optional)
- -for (optional, defaults to
"UPDATE"
)- -prepare (optional)
- Parameters:
- qn (required)
- sql (required)
- Testcases:
- No testcase defined.
acs::db::Driver method sets (protected)
<instance of acs::db::Driver> sets [ -dbn dbn ] [ -bind bind ] \ [ -prepare prepare ] qn sql
- Switches:
- -dbn (optional)
- -bind (optional)
- -prepare (optional)
- Parameters:
- qn (required)
- sql (required)
- Testcases:
- No testcase defined.
acs::db::Driver method transaction (protected)
<instance of acs::db::Driver> transaction [ -dbn dbn ] script \ args [ args... ]
- Switches:
- -dbn (optional)
- Parameters:
- script (required)
- args (required)
- Testcases:
- No testcase defined.
acs::db::nsdb method list (public)
<instance of acs::db::nsdb> list [ -dbn dbn ] [ -bind bind ] \ [ -prepare prepare ] qn sql
Return a Tcl list, where each element contains just the first the column values of the tuples returned by the provided SQL query.
- Switches:
- -dbn (optional)
- database identifier
- -bind (optional)
- optional bind variables for the SQL query
- -prepare (optional)
- type information for the bind variables in the prepared statement
- Parameters:
- qn (required)
- name of the SQL query
- sql (required)
- SQL query
- Testcases:
- No testcase defined.
acs::db::nsdb method list_of_lists (public)
<instance of acs::db::nsdb> list_of_lists [ -dbn dbn ] \ [ -bind bind ] [ -prepare prepare ] qn sql
Return a Tcl list, where each element consists of a list of the column values corresponding to the values of the tuples returned by the provided SQL query.
- Switches:
- -dbn (optional)
- database identifier
- -bind (optional)
- optional bind variables for the SQL query
- -prepare (optional)
- type information for the bind variables in the prepared statement
- Parameters:
- qn (required)
- name of the SQL query
- sql (required)
- SQL query
- Testcases:
- No testcase defined.
acs::db::nsdbi method list (public)
<instance of acs::db::nsdbi> list [ -dbn dbn ] [ -bind bind ] \ [ -prepare prepare ] qn sql
Return a Tcl list, where each element contains just the first the column values of the tuples returned by the provided SQL query.
- Switches:
- -dbn (optional)
- database identifier
- -bind (optional)
- optional bind variables for the SQL query
- -prepare (optional)
- not used for NSDBI, providing interface compatibility with NSDB
- Parameters:
- qn (required)
- name of the SQL query
- sql (required)
- SQL query
- Testcases:
- No testcase defined.
acs::db::nsdbi method list_of_lists (public)
<instance of acs::db::nsdbi> list_of_lists [ -dbn dbn ] \ [ -bind bind ] [ -prepare prepare ] qn sql
Return a Tcl list, where each element consists of a list of the column values corresponding to the values of the tuples returned by the provided SQL query.
- Switches:
- -dbn (optional)
- database identifier
- -bind (optional)
- optional bind variables for the SQL query
- -prepare (optional)
- not used for NSDBI, providing interface compatibility with NSDB
- Parameters:
- qn (required)
- name of the SQL query
- sql (required)
- SQL query
- Testcases:
- No testcase defined.
acs::db::require_dc (private)
acs::db::require_dc [ -backend backend ] [ -driver driver ] \ [ -name name ]
Select the driver based on the specified argument (either DB or DBI) or based on the defaults for the configuration. This function can be used to switch the driver as well dynamically.
- Switches:
- -backend (optional)
- "postgresql" or "oracle" or empty. When empty, determine backed from db_driverkey.
- -driver (optional)
- "nsdb" or "nsdbi" or empty. When empty, assume "nsdb" unless "preferdbi" is set.
- -name (optional, defaults to
"::acs::dc"
)- of the interface object (defaults to "::acs::dc")
- Returns:
- database interface object
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.