#include <QueryTranslator.h>
Inheritance diagram for LcgInfo::QueryTranslator:
Public Methods | |
QueryTranslator () | |
Constructor using "./mappingGlueRMA" as the default name for the mapfile. More... | |
QueryTranslator (std::string const &pMapFile) | |
Constructor passing the name of the file that has to be used for the mapping. More... | |
QueryTranslator (LcgConfigBuffer::ConfigBuffer &pMap) | |
Constructor passing a reference to the already existing LcgConfigBuffer::ConfigBuffer object that is used for the mapping. More... | |
virtual | ~QueryTranslator () |
Destructor of the class. | |
virtual std::vector< std::string > | translateQuery (std::string const &pQueryCanonical)=0 |
Translates the specified query (intended to be posed to the canonical schema) into some new queries that can be posed to the implementation specific schema (in order) to retrieve the same information. More... | |
Protected Attributes | |
LcgConfigBuffer::ConfigBuffer * | mMap |
A pointer to the object that reads the mapping file and holds the information there contained. More... | |
bool | mOurMap |
A boolean to know if mMap was created by us, and thus our destructor must delete it (true), or it was created outside us, and we should not destroy it (false). | |
TableRowTranslator * | mTRowT |
A pointer to the object that can perform the translation between the canonical names and the implementation ones. More... |
The equivalent schema is mapped to the canonical one using a mapping file (whose syntax must conform to the standard definition). The query language used to express the original query and the one for the resulting query will be defined in classes extending this one. For instance a SQLtoLDAPQueryTranslator would implement the virtual methods here defined for the SQL query language as input an LDAP query language as output.
Definition at line 30 of file QueryTranslator.h.
|
Constructor using "./mappingGlueRMA" as the default name for the mapfile. Please do not use this constructor. It may throw a QueryTranslationException if the specified mapping file cannot be loaded. Definition at line 13 of file QueryTranslator.cpp. References LcgInfo::int2str, mMap, mOurMap, mTRowT, and LcgConfigBuffer::ConfigBuffer::populate_from_config. |
|
Constructor passing the name of the file that has to be used for the mapping. It may throw a QueryTranslationException if the specified mapping file cannot be loaded.
Definition at line 29 of file QueryTranslator.cpp. References LcgInfo::int2str, mMap, mOurMap, mTRowT, and LcgConfigBuffer::ConfigBuffer::populate_from_config. |
|
Constructor passing a reference to the already existing LcgConfigBuffer::ConfigBuffer object that is used for the mapping. Using this constructor implies that the LcgConfigBuffer::ConfigBuffer object was instantiated externally, and it requires that it does not go out of scope.
Definition at line 43 of file QueryTranslator.cpp. |
|
Translates the specified query (intended to be posed to the canonical schema) into some new queries that can be posed to the implementation specific schema (in order) to retrieve the same information. Several queries may be needed for cases where the output language does not support joins. In that case, queries refer to the results of the others by "n#", where "n" is the query number. It may throw a QueryTranslationException if there are problems parsing the specified predicate
Implemented in LcgInfo::SQLQueryTranslator. |
|
A pointer to the object that reads the mapping file and holds the information there contained. The object itself can be instantiated by default inside this class, or can be instantiated in an external one. Definition at line 88 of file QueryTranslator.h. Referenced by QueryTranslator, and ~QueryTranslator. |
|
A pointer to the object that can perform the translation between the canonical names and the implementation ones. It uses the mMap pointer to perform this translations. The object itself can be instantiated by default inside this class, or can be instantiated in an external one. Definition at line 103 of file QueryTranslator.h. Referenced by QueryTranslator, LcgInfo::SQLQueryTranslator::translateSemantic, and ~QueryTranslator. |