Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

SQLQueryTranslator.h

00001                               /* SQLQueryTranslator.h */
00002 
00003 
00004 #ifndef  SQL_QUERY_TRANSLATOR_HH
00005 #define  SQL_QUERY_TRANSLATOR_HH
00006 
00007 #include "TableRowTranslator.h"
00008 #include "QueryTranslationException.h"
00009 #include "SQLPredicateTree.h"
00010 #include <set>
00011 #include "QueryTranslator.h"
00012 
00013 
00014 namespace LcgInfo{
00015 /**************************  CLASS SQLQueryTranslator  *******************************/
00016 
00032 class SQLQueryTranslator: public QueryTranslator{
00033 
00034 public:
00035 
00042    SQLQueryTranslator();
00043 
00051    SQLQueryTranslator(std::string const & pMapFile);
00052 
00061    SQLQueryTranslator(LcgConfigBuffer::ConfigBuffer & pMap);
00062 
00066    virtual ~SQLQueryTranslator();
00067 
00080    virtual std::vector<std::string> translateQuery(std::string const & pQueryCanonical)=0;
00081 
00095    void translateSemantic(std::string const & pQueryCanonical, SQLPredicateTree & pPred,
00096                           std::vector<std::string> & pRowsToReturn,
00097                           std::set<std::string> & pNewTableList);
00098 
00099    
00100 protected:
00101    
00102 /*
00103  * Used to tokenize input SQL queries
00104  */
00105 static std::string const CHARS_TO_DIVIDE_SQL_WORDS;
00106 
00107 /*
00108  * The chars that can be escaped by the user in his/her original query.
00109  */
00110 static std::string const CHARS_POSSIBLY_ESCAPED;
00111    
00112 }; // end of class SQLQueryTranslator
00113 
00114 
00115 }
00116 #endif

Generated on Tue Oct 5 14:42:45 2004 for LCG Information System Interface by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002