#include <Ql_baseop2.hxx>
Inherits Ql_otherops.
Inheritance diagram for Ql_baseop2:
Public Member Functions | |
| Ql_baseop2 (int, Ql_operation *, Ql_operation *) | |
| ~Ql_baseop2 () | |
| Ql_operation * | parameter1 () |
| Ql_operation * | parameter2 () |
| int | is_equiv (Ql_operation *, Ql_renaming *, Ql_iterop *) |
| void | update_nesting_links () |
| int | type_infer (int *) |
| int | union_type_infer (int *) |
| int | set_to_true () |
| int | evaluate () |
| int(Ql_baseop2::* | exec_function ())() |
| int | insert_one_class_instance () |
| int | delete_one_class_instance () |
Public Attributes | |
| char * | SQLcond |
| Ql_baseop2::Ql_baseop2 | ( | int | n, | |
| Ql_operation * | p1, | |||
| Ql_operation * | p2 | |||
| ) |
Construction of a baseop2 operation
| Ql_baseop2::~Ql_baseop2 | ( | ) |
Destruction of a baseop2
| Ql_operation* Ql_baseop2::parameter1 | ( | ) | [inline] |
| Ql_operation* Ql_baseop2::parameter2 | ( | ) | [inline] |
| int Ql_baseop2::is_equiv | ( | Ql_operation * | op, | |
| Ql_renaming * | renaming, | |||
| Ql_iterop * | circle | |||
| ) | [virtual] |
Used when testing the equivalence of two iterators. (see Ql_algiterop::is_equiv(Ql_operation *, Ql_renaming *, Ql_iterop *) Checks the equivalence of two operations inside the main query (circle=NULL) or inside an iterator (circle<>NULL) according to a variable renaming. The rule says that outside the circle the operations must be strictly equal and that inside they must be equivalent (variables renaming).
| op | the operation to check equivalence with | |
| renaming | a variable renaming | |
| circle | the iterator in which we check the equivalence |
Implements Ql_operation.
| void Ql_baseop2::update_nesting_links | ( | ) |
Update of the dependency links. A binary operation is nested in the most embedded iterator its parameters are nested in and depends on the variables belonging to this iterator and on which its parameters depend
| int Ql_baseop2::type_infer | ( | int * | error_code | ) |
Infers the type and assigns the code of a binary operation. Code assignment is done by auxiliary member functions. When kind<>bool, type assignment is done by the auxiliary function, otherwise it is done by type_infer
| error_code | a placeholder, where an error code is put, in case of error |
| int Ql_baseop2::union_type_infer | ( | int * | error_code | ) |
Special type inference function for the case that at least one of the parameters is of union type. Infers the type and assigns the code of a binary operation. Note that the evaluation code for an operation is different if none, one or both its parameter have union type (so that the evaluation code is as minimal as possible). Code assignment is done by auxiliary member functions. When kind<>bool, type assignment is done by the auxiliary function, otherwise it is done by type_infer
| error_code | a placeholder, where an error code is put, in case of error |
Cut out for now ... enable later <GPK> case ith_n: Requires constant index for seq !!! if(v_parameter1->kind() == QL_SEQ && v_parameter2->kind() == QL_INT){ int ind = v_parameter2->result()->res.intvalue; Ql_type *tmp2 = v_parameter1->type()->elementAt(ind);
kind(tmp2->kind()); if(tmp2->type() != 0){ type(tmp2->type()->duplicate()); } v_code = &Ql_baseop2::ith; } </GPK>
| int Ql_baseop2::set_to_true | ( | ) | [inline] |
Sets the evaluation code for this operation to a function returning always true. Used to avoid the evaluation of operations which are pushed to the underlying database.
| int Ql_baseop2::evaluate | ( | ) | [virtual] |
Check if the stored result is outdated. If yes, execute the proper evaluation function.
Implements Ql_operation.
| int(Ql_baseop2::* Ql_baseop2::exec_function | ( | ) | [inline] |
| int Ql_baseop2::insert_one_class_instance | ( | ) |
The following description applies for all the insert_*resource* functions: Insert a resource (second parameter) as an instance of a class (first parameter).
| int Ql_baseop2::delete_one_class_instance | ( | ) |
The following description applies for all DELETE resource methods: Remove a resource (second parameter) from a class (first parameter)
- all properties with this resource as domain or range are removed if they are not applicable anymore.
| char* Ql_baseop2::SQLcond |
In case this operation can be pushed to the underlying database, this field contains the equivalent query string which is appended to the appropriate scan query
1.5.0