#include <SQLtoSQLPredicateTree.h>
Inheritance diagram for LcgInfo::SQLtoSQLPredicateTree:
Public Methods | |
SQLtoSQLPredicateTree () | |
Constructor of the class. More... | |
virtual | ~SQLtoSQLPredicateTree () |
Destructor of the class. | |
SQLtoSQLPredicateTree * | create () |
Creates a new node of the type of this node (SQLtoSQLPredicateTree). More... | |
virtual SQLtoSQLPredicateTree * | clone () |
Recursively copies this node and all the nodes below it. More... | |
virtual std::string | evaluate (std::vector< std::string > &pQueries) |
Returns the predicate (and possibly list of necessary subqueries) resulting of evaluating this node and all its descendants. More... |
Each object is a node linked to its two children nodes (left and right). This class extends the SQLPredicateTree, and overloads the evaluate() method, so that the evaluation is expressed using SQL.
Definition at line 22 of file SQLtoSQLPredicateTree.h.
|
Constructor of the class. It just creates an empty object. Definition at line 16 of file SQLtoSQLPredicateTree.cpp. |
|
Recursively copies this node and all the nodes below it. The resulting object's dynamic type will be that of this class. It is a trick (similar to a virtual copy constructor) used to allow the recursive copy of the tree.
Implements LcgInfo::SQLPredicateTree. Definition at line 28 of file SQLtoSQLPredicateTree.cpp. References create, LcgInfo::PredicateTree::depth, LcgInfo::PredicateTree::left, LcgInfo::PredicateTree::right, SQLtoSQLPredicateTree, LcgInfo::PredicateTree::type, and LcgInfo::PredicateTree::value. |
|
Creates a new node of the type of this node (SQLtoSQLPredicateTree). It uses some default values (in order to use a template, use the PredicateTree::clone() method). It is a trick (virtual constructor) used to allow the recursive creation of the tree when inserting predicates. It overloads a method of the SQLPredicaTree class.
Implements LcgInfo::SQLPredicateTree. Definition at line 24 of file SQLtoSQLPredicateTree.cpp. References SQLtoSQLPredicateTree. Referenced by clone. |
|
Returns the predicate (and possibly list of necessary subqueries) resulting of evaluating this node and all its descendants. It just composes a global predicate ordering the predicates in an infix expression (SQL like). It may throw a QueryTranslationException if the node (or one of its children) cannot be parsed properly.
Implements LcgInfo::SQLPredicateTree. Definition at line 49 of file SQLtoSQLPredicateTree.cpp. References LcgInfo::PredicateTree::depth, LcgInfo::int2str, LcgInfo::PredicateTree::left, LcgInfo::nocaseCompare, LcgInfo::PredicateTree::right, LcgInfo::PredicateTree::type, and LcgInfo::PredicateTree::value. |