- Publicity: Public Only All
40-db-query-dispatcher-procs.tcl
Query Dispatching for multi-RDBMS capability
- Location:
- packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl
- Authors:
- Ben Adida <ben@openforce.net>
- Bart Teeuwisse <bart.teeuwisse@thecodemill.biz>
- CVS Identification:
$Id: 40-db-query-dispatcher-procs.tcl,v 1.51 2024/09/11 06:15:47 gustafn Exp $
Procedures in this file
- db_current_rdbms (public)
- db_fullquery_get_querytext (public)
- db_map (public)
- db_qd_fetch (public)
- db_qd_get_fullname (public)
- db_qd_load_query_file (public)
- db_qd_prepare_queryfile_content (public)
- db_qd_replace_sql (public)
- db_rdbms_create (public, deprecated)
Detailed information
db_current_rdbms (public)
db_current_rdbms
- Returns:
- the current rdbms type and version.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- db__database_interface
db_fullquery_get_querytext (public)
db_fullquery_get_querytext fullquery
Accessor for fullquery data abstraction
- Parameters:
- fullquery (required)
- datastructure constructed by db_fullquery_create
- Returns:
- query text
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- db__database_interface
db_map (public)
db_map snippet_name
fetch a query snippet. used to provide db-specific query snippets when porting highly dynamic queries. (OpenACS - DanW)
- Parameters:
- snippet_name (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- db_map
db_qd_fetch (public)
db_qd_fetch fullquery_name [ rdbms ]
Fetch a query with a given name This procedure returns the latest FullQuery data structure given proper scoping rules for a complete/global query name. This may or may not be cached, the caller need not know.
- Parameters:
- fullquery_name (required)
- rdbms (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- db__database_interface
db_qd_get_fullname (public)
db_qd_get_fullname local_name [ added_stack_num ]
Find the fully qualified name of the query
- Parameters:
- local_name (required)
- added_stack_num (optional, defaults to
"1"
)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- db__database_interface
db_qd_load_query_file (public)
db_qd_load_query_file file_path [ errorVarName ]
A procedure that is called from the outside world (APM) to load a particular file
- Parameters:
- file_path (required)
- errorVarName (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- db_map
db_qd_prepare_queryfile_content (public)
db_qd_prepare_queryfile_content file_content
Prepare raw .xql-file content form xml-parsing via quoting. The result is parsable XML, where "partialquery" is replaced by "fullquery".
- Parameters:
- file_content (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- files__check_xql_files
db_qd_replace_sql (public)
db_qd_replace_sql [ -ulevel ulevel ] [ -subst subst ] statement_name \ sql
- Switches:
- -ulevel (optional)
- -subst (optional, defaults to
"all"
)- Parameters:
- statement_name (required)
- sql (required)
- Returns:
- sql for statement_name (defaulting to sql if not found)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- db__db_foreach, db_bind_var_substitution, db__transaction, db__transaction_bug_3440
db_rdbms_create (public, deprecated)
db_rdbms_create type version
Deprecated. Invoking this procedure generates a warning.
The function is not needed, since all it returns is a plain Tcl dict with obvious keys (type and version)
- Parameters:
- type (required)
- version (required)
- Returns:
- rdbms descriptor in form of a dict
- See Also:
- dict
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.