Ql_upiterop Class Reference

#include <Ql_upiterop.hxx>

Inherits Ql_algiterop.

Inheritance diagram for Ql_upiterop:

[legend]
Collaboration diagram for Ql_upiterop:
[legend]
List of all members.

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 *)

Detailed Description

Class Ql_upiterop groups the algebraic iterators (JS) as well as update operators. They are characterised by scan operations, a list of projections and criteria for selection, like algiterop. What's more, upiterop is responsible for carrying the update operators.

Author:
Stavros Sahtouris
Version:
1.0


Constructor & Destructor Documentation

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


Member Function Documentation

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.

Parameters:
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
Returns:
KO in case of an error, OK otherwise.

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.

Parameters:
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
Returns:
KO (1) if there was an error and set the error_code, OK (0) otherwise

int Ql_upiterop::type_infer ( int *  error_code  ) 

Type inference for an update iterator. Creates type for the result

Reimplemented from Ql_algiterop.


The documentation for this class was generated from the following files:
Generated on Thu Oct 26 16:42:13 2006 for rul by  doxygen 1.5.0