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

LcgInfo::SQLtoSQLQueryTranslator Class Reference

This class is used to translate an SQL query posed to a canonical relational schema into a new SQL query that can be posed to an equivalent schema (i.e.: containing the same actual information), in order to retrieve the same information. More...

#include <SQLtoSQLQueryTranslator.h>

Inheritance diagram for LcgInfo::SQLtoSQLQueryTranslator:

LcgInfo::SQLQueryTranslator LcgInfo::QueryTranslator List of all members.

Public Methods

 SQLtoSQLQueryTranslator ()
 Constructor using "./mappingGlueRMA" as the default name for the mapfile. More...

 SQLtoSQLQueryTranslator (std::string const &pMapFile)
 Constructor passing the name of the file that has to be used for the mapping. More...

 SQLtoSQLQueryTranslator (LcgConfigBuffer::ConfigBuffer &pMap)
 Constructor passing a reference to the already existing LcgConfigBuffer::ConfigBuffer object that is used for the mapping. More...

virtual ~SQLtoSQLQueryTranslator ()
 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 new SQL query that can be posed to the implementation specific schema in order to retrieve the same information. More...


Detailed Description

This class is used to translate an SQL query posed to a canonical relational schema into a new SQL query that can be posed to an equivalent schema (i.e.: containing the same actual information), in order to retrieve the same information.

The equivalent schema is mapped to the canonical one using a mapping file.

Author:
LCG's EIS Group. CERN.
Version:
1.0
Date:
2004.

Definition at line 24 of file SQLtoSQLQueryTranslator.h.


Constructor & Destructor Documentation

SQLtoSQLQueryTranslator::SQLtoSQLQueryTranslator  
 

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 13 of file SQLtoSQLQueryTranslator.cpp.

SQLtoSQLQueryTranslator::SQLtoSQLQueryTranslator std::string const &    pMapFile
 

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.

Parameters:
pMapFile  the name of the mapping file

Definition at line 17 of file SQLtoSQLQueryTranslator.cpp.

SQLtoSQLQueryTranslator::SQLtoSQLQueryTranslator LcgConfigBuffer::ConfigBuffer   pMap
 

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.

Parameters:
pMap  a reference to the LcgConfigBuffer::ConfigBuffer object used for the mapping

Definition at line 21 of file SQLtoSQLQueryTranslator.cpp.


Member Function Documentation

vector< string > SQLtoSQLQueryTranslator::translateQuery std::string const &    pQueryCanonical [virtual]
 

Translates the specified SQL query (intended to be posed to the canonical schema) into a new SQL query that can be posed to the implementation specific schema in order to retrieve the same information.

As the output language is SQL, the resulting translation has only one query. It may throw a QueryTranslationException if the specified query cannot be parsed or translated properly.

Parameters:
pQueryCanonical  the query to be translated
Returns:
the resulting translated query (in position 0 of the vector)

Implements LcgInfo::SQLQueryTranslator.

Definition at line 28 of file SQLtoSQLQueryTranslator.cpp.

References LcgInfo::SQLQueryTranslator::translateSemantic.


The documentation for this class was generated from the following files:
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