db_qd_pick_most_specific_query (private)
db_qd_pick_most_specific_query rdbms query_1 query_2
Defined in packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl
For now, we're going to say that versions are numbers and that there is always backwards compatibility.
- Parameters:
- rdbms (required)
- query_1 (required)
- query_2 (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set rdbms_1 [db_fullquery_get_rdbms $query_1] set rdbms_2 [db_fullquery_get_rdbms $query_2] # We ASSUME that both queries are at least compatible. # Otherwise this is a stupid exercise if {[db_rdbms_get_version $rdbms_1] eq ""} { return $query_2 } if {[db_rdbms_get_version $rdbms_2] eq ""} { return $query_1 } if {[db_rdbms_get_version $rdbms_1] > [db_rdbms_get_version $rdbms_2]} { return $query_1 } else { return $query_2 }XQL Not present: Generic, PostgreSQL, Oracle