#include <Ql_upiterop.hxx>
Inherits Ql_algiterop.
Inheritance diagram for Ql_upiterop:
Public Member Functions | |
| Ql_upiterop (int, Ql_iterop *, int) | |
| ~Ql_upiterop () | |
| int | add_update (Ql_query *, Ql_tree_node *, Ql_dup_cell *, Ql_argument *, int *) |
| int | add_update_criteria_ufw (Ql_query *, Ql_tree_node *, Ql_dup_cell *, Ql_argument *, int *, Ql_iterop *) |
| int | type_infer (int *) |
| Ql_upiterop::Ql_upiterop | ( | int | n, | |
| Ql_iterop * | i, | |||
| int | li | |||
| ) |
Construction of an upiterop operation. Parameters are used for the initialization of superclass Ql_algiterop
| Ql_upiterop::~Ql_upiterop | ( | ) |
Destruction of an upiterop operation
| int Ql_upiterop::add_update | ( | Ql_query * | query, | |
| Ql_tree_node * | query_tree, | |||
| Ql_dup_cell * | cnf_dup_table, | |||
| Ql_argument * | ql_arguments, | |||
| int * | error_code | |||
| ) |
Adds the core update operations but don't do anything else.
| query | the query graph | |
| query_tree | the parse tree of the query | |
| cnf_dup_table | a table containing should be duplicated syntactical subtrees (because of conjunctive normal form) | |
| ql_arguments | ||
| error_code | a placeholder, where an error code is put, in case of error |
| int Ql_upiterop::add_update_criteria_ufw | ( | Ql_query * | query, | |
| Ql_tree_node * | query_tree, | |||
| Ql_dup_cell * | cnf_dup_table, | |||
| Ql_argument * | ql_arguments, | |||
| int * | error_code, | |||
| Ql_iterop * | current_iter | |||
| ) |
Used for constructing the update and criteria attributes of a fw filter. A fw always has one criterium per scan variable + 1. v_criteria[0] is used for the conditions depending one more than one variables (join conditions) or on another iterator (join or dependent join conditions) (and-ed if more than one/null if none). Conditions on others iterator occur too rarely to be optimized. They won't be evaluated more than needed anyway. v_criteria[0] is tested after each new assignment of any of the scan variables. v_criteria[i] contains the conditions dependending on one scan variable only (anded if more than one/null if none) and i=the scan var position + 1. For anding together several criteria, we use the above function (add_condition_in_criterium_sfw()). v_criteria[i] is evaluated after each assignment on variable i, if it is not "pushable" to the underlying DBMS, (i.e. expressible in its query language) * so that it can be pushed in the scan query and be evaluated by the DBMS.
Most of this code is the same as in Ql_algiterop.add_proj_criteria_sfw except that in the end, projection operations are not added. Update operations are added instead.
| query | the query graph | |
| query_tree | the parse tree of the query | |
| cnf_dup_table | a table containing should be duplicated syntactical subtrees (because of conjunctive normal form) | |
| ql_arguments | ||
| error_code | a placeholder, where an error code is put, in case of error |
| int Ql_upiterop::type_infer | ( | int * | error_code | ) |
Type inference for an update iterator. Creates type for the result
Reimplemented from Ql_algiterop.
1.5.0