db_qd_replace_sql (public)

 db_qd_replace_sql statement_name sql

Defined in packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl

Parameters:
statement_name
sql
Returns:
sql for statement_name (defaulting to sql if not found)

Partial Call Graph (max 5 caller/called nodes):
%3 db_blob_get db_blob_get (public) db_qd_replace_sql db_qd_replace_sql 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 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_qd_log db_qd_log (private) db_qd_replace_sql->db_qd_log

Testcases:
No testcase defined.
Source code:
 
    set fullquery [db_qd_fetch $statement_name]

    if {$fullquery ne ""} {
	set sql [db_fullquery_get_querytext $fullquery]
    } else {
	db_qd_log Debug "NO FULLQUERY FOR $statement_name --> using default SQL"
        if { $sql eq "" } {
            # The default SQL is empty, that implies a bug somewhere in the code.
            error "No fullquery for $statement_name and default SQL empty - query for statement missing"
        }
    }

    return $sql
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: