• 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

Detailed information

db_current_rdbms (public)

 db_current_rdbms
Returns:
the current rdbms type and version.

Partial Call Graph (max 5 caller/called nodes):
%3 test_db__database_interface db__database_interface (test acs-bootstrap-installer) db_current_rdbms db_current_rdbms test_db__database_interface->db_current_rdbms db_type db_type (public) db_current_rdbms->db_type db_version db_version (public) db_current_rdbms->db_version db_qd_internal_store_cache db_qd_internal_store_cache (private) db_qd_internal_store_cache->db_current_rdbms packages/bookmarks/www/search.tcl packages/bookmarks/ www/search.tcl packages/bookmarks/www/search.tcl->db_current_rdbms

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):
%3 test_db__database_interface db__database_interface (test acs-bootstrap-installer) db_fullquery_get_querytext db_fullquery_get_querytext test_db__database_interface->db_fullquery_get_querytext Class ::acs::db::Driver Class ::acs::db::Driver (public) Class ::acs::db::Driver->db_fullquery_get_querytext acs::db::Driver instproc get_sql acs::db::Driver instproc get_sql (protected) acs::db::Driver instproc get_sql->db_fullquery_get_querytext db_map db_map (public) db_map->db_fullquery_get_querytext db_qd_internal_load_queries db_qd_internal_load_queries (private) db_qd_internal_load_queries->db_fullquery_get_querytext db_qd_replace_sql db_qd_replace_sql (public) db_qd_replace_sql->db_fullquery_get_querytext

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):
%3 test_db_map db_map (test acs-bootstrap-installer) db_map db_map test_db_map->db_map db_fullquery_get_querytext db_fullquery_get_querytext (public) db_map->db_fullquery_get_querytext db_qd_fetch db_qd_fetch (public) db_map->db_qd_fetch db_qd_get_fullname db_qd_get_fullname (public) db_map->db_qd_get_fullname acs_object_type_hierarchy acs_object_type_hierarchy (public) acs_object_type_hierarchy->db_map ad_set_client_property ad_set_client_property (public) ad_set_client_property->db_map application_data_link::get_links_from application_data_link::get_links_from (public) application_data_link::get_links_from->db_map application_data_link::get_links_to application_data_link::get_links_to (public) application_data_link::get_links_to->db_map application_data_link::relation_tag_where_clause application_data_link::relation_tag_where_clause (public) application_data_link::relation_tag_where_clause->db_map

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):
%3 test_db__database_interface db__database_interface (test acs-bootstrap-installer) db_qd_fetch db_qd_fetch test_db__database_interface->db_qd_fetch db_qd_internal_get_cache db_qd_internal_get_cache (private) db_qd_fetch->db_qd_internal_get_cache Class ::acs::db::Driver Class ::acs::db::Driver (public) Class ::acs::db::Driver->db_qd_fetch acs::db::Driver instproc get_sql acs::db::Driver instproc get_sql (protected) acs::db::Driver instproc get_sql->db_qd_fetch db_map db_map (public) db_map->db_qd_fetch db_qd_replace_sql db_qd_replace_sql (public) db_qd_replace_sql->db_qd_fetch

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):
%3 test_db__database_interface db__database_interface (test acs-bootstrap-installer) db_qd_get_fullname db_qd_get_fullname test_db__database_interface->db_qd_get_fullname ad_conn ad_conn (public) db_qd_get_fullname->ad_conn ad_make_relative_path ad_make_relative_path (public) db_qd_get_fullname->ad_make_relative_path apm_source apm_source (public) db_qd_get_fullname->apm_source db_qd_make_absolute_path db_qd_make_absolute_path (private) db_qd_get_fullname->db_qd_make_absolute_path db_qd_null_path db_qd_null_path (private) db_qd_get_fullname->db_qd_null_path Class ::acs::db::Driver Class ::acs::db::Driver (public) Class ::acs::db::Driver->db_qd_get_fullname acs::db::Driver instproc get_sql acs::db::Driver instproc get_sql (protected) acs::db::Driver instproc get_sql->db_qd_get_fullname db_0or1row db_0or1row (public) db_0or1row->db_qd_get_fullname db_blob_get db_blob_get (public) db_blob_get->db_qd_get_fullname db_blob_get_file db_blob_get_file (public) db_blob_get_file->db_qd_get_fullname

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):
%3 test_db_map db_map (test acs-bootstrap-installer) db_qd_load_query_file db_qd_load_query_file test_db_map->db_qd_load_query_file ad_make_relative_path ad_make_relative_path (public) db_qd_load_query_file->ad_make_relative_path db_qd_internal_load_cache db_qd_internal_load_cache (private) db_qd_load_query_file->db_qd_internal_load_cache apm_load_queries apm_load_queries (private) apm_load_queries->db_qd_load_query_file

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):
%3 test_files__check_xql_files files__check_xql_files (test acs-tcl) db_qd_prepare_queryfile_content db_qd_prepare_queryfile_content test_files__check_xql_files->db_qd_prepare_queryfile_content apidoc::get_xql_snippet apidoc::get_xql_snippet (private) apidoc::get_xql_snippet->db_qd_prepare_queryfile_content db_qd_internal_load_queries db_qd_internal_load_queries (private) db_qd_internal_load_queries->db_qd_prepare_queryfile_content

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):
%3 test_db__db_foreach db__db_foreach (test acs-tcl) db_qd_replace_sql db_qd_replace_sql test_db__db_foreach->db_qd_replace_sql test_db__transaction db__transaction (test acs-tcl) test_db__transaction->db_qd_replace_sql test_db__transaction_bug_3440 db__transaction_bug_3440 (test acs-tcl) test_db__transaction_bug_3440->db_qd_replace_sql test_db_bind_var_substitution db_bind_var_substitution (test acs-tcl) test_db_bind_var_substitution->db_qd_replace_sql db_fullquery_get_querytext db_fullquery_get_querytext (public) db_qd_replace_sql->db_fullquery_get_querytext db_qd_fetch db_qd_fetch (public) db_qd_replace_sql->db_qd_fetch db_blob_get db_blob_get (public) db_blob_get->db_qd_replace_sql db_exec db_exec (public) db_exec->db_qd_replace_sql db_exec_lob_oracle db_exec_lob_oracle (private) db_exec_lob_oracle->db_qd_replace_sql db_exec_lob_postgresql db_exec_lob_postgresql (private) db_exec_lob_postgresql->db_qd_replace_sql db_exec_plpgsql db_exec_plpgsql (private) db_exec_plpgsql->db_qd_replace_sql

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):
%3 ad_log_deprecated ad_log_deprecated (public) db_rdbms_create db_rdbms_create db_rdbms_create->ad_log_deprecated

Testcases:
No testcase defined.
[ show source ]