#include <SQLtoLDAPQueryTranslator.h>
Inheritance diagram for LcgInfo::SQLtoLDAPQueryTranslator:
Public Methods | |
SQLtoLDAPQueryTranslator () | |
Constructor using "./mappingGlueRMA" as the default name for the mapfile. More... | |
SQLtoLDAPQueryTranslator (std::string const &pMapFile) | |
Constructor passing the name of the file that has to be used for the mapping. More... | |
SQLtoLDAPQueryTranslator (LcgConfigBuffer::ConfigBuffer &pMap) | |
Constructor passing a reference to the already existing LcgConfigBuffer::ConfigBuffer object that is used for the mapping. More... | |
virtual | ~SQLtoLDAPQueryTranslator () |
Destructor of the class. | |
virtual std::vector< std::string > | translateQuery (std::string const &pQueryCanonical) |
Translates the specified SQL query (intended to be posed to the canonical schema) into a vector of LDAP queries that can be posed to the implementation specific schema in order to retrieve the same information. More... | |
Static Protected Attributes | |
std::string const | CHARS_TO_DIVIDE_LDAP_WORDS = " \t=><()!" |
Used to tokenize a resulting LDAP query. |
In the translation process, several intermediate LDAP queries may be performed (in order to emulate SQL joins), and so, the class needs access to the LDAP interface. This class extends the more general, but abstract, SQLQueryTranslator class.
Definition at line 24 of file SQLtoLDAPQueryTranslator.h.
|
Constructor using "./mappingGlueRMA" as the default name for the mapfile. It may throw a QueryTranslationException if the specified mapping file cannot be loaded. Please do not use this constructor. Definition at line 15 of file SQLtoLDAPQueryTranslator.cpp. |
|
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 19 of file SQLtoLDAPQueryTranslator.cpp. |
|
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 23 of file SQLtoLDAPQueryTranslator.cpp. |
|
Translates the specified SQL query (intended to be posed to the canonical schema) into a vector of LDAP queries that can be posed to the implementation specific schema in order to retrieve the same information. Queries can refer to the results of other queries by specifying "n#", where "n" is the query number (if several values are retrieved by a subquery, it is the first one that can be used by others). The last element of the vector is not a query, but a list of results that have been requested as return values of the query (SELECT part of the SQL query). This list is a comma separated subqueries number list. The first result of a subquery (all but the last one) is included as result only if the number is in the list. All the other results (including all of the last one) are always included. It may throw a QueryTranslationException if the specified query cannot be parsed or translated properly.
Implements LcgInfo::SQLQueryTranslator. Definition at line 30 of file SQLtoLDAPQueryTranslator.cpp. References LcgInfo::extractRow, LcgInfo::extractTable, LcgInfo::int2str, LcgInfo::tokenizeStrWithIndices, and LcgInfo::SQLQueryTranslator::translateSemantic. |