• 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.49.2.15 2021/03/01 12:05:15 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_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 - 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 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

Partial Call Graph (max 5 caller/called nodes):
%3 acs_object_type_hierarchy acs_object_type_hierarchy (public) db_map db_map 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:
No testcase defined.

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
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_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
added_stack_num (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 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 db_dml db_dml (public) db_dml->db_qd_get_fullname db_exec_plsql db_exec_plsql (public) db_exec_plsql->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
errorVarName (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_load_queries apm_load_queries (private) db_qd_load_query_file db_qd_load_query_file apm_load_queries->db_qd_load_query_file

Testcases:
No testcase defined.

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

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 (defaults to "all") (optional)
Parameters:
statement_name
sql
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_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
version
Returns:
rdbms descriptor in form of a dict

See Also:
  • dict

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
[ show source ]