db_qd_internal_parse_init (private)
db_qd_internal_parse_init stuff_to_parse file_path
Defined in packages/acs-bootstrap-installer/tcl/40-db-query-dispatcher-procs.tcl
Initialize the parsing state
- Parameters:
- stuff_to_parse (required)
- file_path (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: # Do initial parse set parsed_doc [xml_parse -persist $stuff_to_parse] # Initialize the parsing state set index 0 # Get the list of queries out set root_node [xml_doc_get_first_node $parsed_doc] # Check if the node is a queryset if {[xml_node_get_name $root_node] ne "queryset"} { # db_qd_log Error "OH OH, error, first node is [xml_node_get_name $root_node] and not 'queryset'" return "" } # Extract the default RDBMS if there is one set rdbms_nodes [xml_node_get_children_by_name $root_node rdbms] if {[llength $rdbms_nodes] > 0} { set default_rdbms [db_rdbms_parse_from_xml_node [lindex $rdbms_nodes 0]] # db_qd_log QDDebug "Detected DEFAULT RDBMS for whole queryset: $default_rdbms" } else { set default_rdbms "" } set parsed_stuff [xml_node_get_children_by_name $root_node fullquery] #db_qd_log QDDebug "db_qd_internal_parse_init extra info: " # "index: $index; parsed_stuff: $parsed_stuff; parsed_doc: $parsed_doc;" return [list $index $parsed_stuff $parsed_doc $default_rdbms $file_path]XQL Not present: Generic, PostgreSQL, Oracle