#include <SQLtoSQLQuerier.h>
Inheritance diagram for LcgInfo::SQLtoSQLQuerier:
Public Methods | |
SQLtoSQLQuerier () | |
Constructor. | |
virtual | ~SQLtoSQLQuerier () |
Destructor of the class. | |
virtual void | setConfig (LcgConfigBuffer::ConfigBuffer &pConf) |
Sets the config buffer object, so that all necessary information for queries is available. More... | |
virtual std::vector< std::vector< std::string > > | query (std::string const &pQueryCanonical) |
Translates the specified SQL query (intended to be posed to the canonical schema) and poses it to the implemented SQL schema, in order to retrieve the same information. More... | |
Protected Attributes | |
LcgConfigBuffer::ConfigBuffer * | mConf |
A pointer to the object that reads the configuration file and holds the information there contained. More... | |
LcgConfigBuffer::ConfigBuffer * | mMap |
A pointer to the object that holds the mapping information (between the canonical and the implementation views of the schema). More... | |
SQLtoSQLQueryTranslator * | mTranslator |
A pointer to the translator that will perform the translation to the original SQL query to one that can be posed to the implemented SQL information service. | |
InfoFromLDAP * | mSql |
A pointer to the SQL interface that will be used to query the implemented SQL information service. |
It extends the Querier class. All the necessary configuration information is provided using a ConfigBuffer object.
Definition at line 24 of file SQLtoSQLQuerier.h.
|
Translates the specified SQL query (intended to be posed to the canonical schema) and poses it to the implemented SQL schema, in order to retrieve the same information. It may throw a LcgInfoException if the configuration file was not properly set or if there is some error in the translation or the interaction with the information service.
Implements LcgInfo::Querier. Definition at line 62 of file SQLtoSQLQuerier.cpp. References LcgInfo::int2str, mSql, and mTranslator. |
|
Sets the config buffer object, so that all necessary information for queries is available. The query method will fail if this method has not been called first. It may throw a ConfigBufferException if no attribute found, or a QueryTranslationException if the mapping file is not found.
Implements LcgInfo::Querier. Definition at line 43 of file SQLtoSQLQuerier.cpp. References LcgConfigBuffer::ConfigBuffer::get_attribute_value, LcgInfo::int2str, mConf, mMap, mSql, mTranslator, and LcgConfigBuffer::ConfigBuffer::populate_from_config. |
|
A pointer to the object that reads the configuration file and holds the information there contained. The object itself is instantiated outside this class (otherwise is NULL and the query() method will not work). Definition at line 69 of file SQLtoSQLQuerier.h. Referenced by setConfig. |
|
A pointer to the object that holds the mapping information (between the canonical and the implementation views of the schema). The name of the file from which this object is build is retrieved from mConf. Definition at line 76 of file SQLtoSQLQuerier.h. Referenced by setConfig. |