00001
00002
00003 #ifndef SQL_PREDICATE_TREE_HH
00004 #define SQL_PREDICATE_TREE_HH
00005
00006 #include "PredicateTree.h"
00007
00008
00009 namespace LcgInfo{
00010
00023 class SQLPredicateTree: public PredicateTree{
00024
00025 public:
00029 SQLPredicateTree();
00030
00034 virtual ~SQLPredicateTree();
00035
00046 virtual SQLPredicateTree* create()=0;
00047
00057 virtual SQLPredicateTree * clone()=0;
00058
00067 virtual void insertPredicate(std::string const & pPred);
00068
00080 virtual std::string evaluate(std::vector<std::string> & pQueries)=0;
00081
00082 protected:
00089 virtual std::string getCHARS_TO_TOKENIZE_PREDICATES();
00090
00091
00092
00093
00094
00095 static std::string const CHARS_TO_ESCAPE_IN_SQL_LITERALS;
00096
00097
00098 private:
00099
00113 void processLevel0(std::string const& pPred, short int& pLastPosLeft,
00114 short int& pFirstPosRight);
00115 };
00116
00117 }
00118 #endif