It represents the SQL query dialect accepted by a given data source. More...
#include <SQLDialect.h>
Public Member Functions | |
const SQLFunctionEncoder * | find (const std::string &funcName) const |
It searches for an encoder for the given function. More... | |
std::vector< std::string > | getRegisteredNames () const |
It gets the all registered names from registed functions. More... | |
void | insert (const std::string &funcName, SQLFunctionEncoder *encoder) |
It adds a new encoder for a given function. More... | |
SQLDialect () | |
Default constructor. More... | |
~SQLDialect () | |
Destructor. More... | |
Private Attributes | |
std::map< std::string, SQLFunctionEncoder * > | m_regFunctions |
A map from the TerraLib general name to a given SQL formatter. More... | |
It represents the SQL query dialect accepted by a given data source.
This class is target for the portability of TerraLib...
Definition at line 55 of file SQLDialect.h.
|
inline |
Default constructor.
Definition at line 60 of file SQLDialect.h.
te::da::SQLDialect::~SQLDialect | ( | ) |
Destructor.
Definition at line 33 of file SQLDialect.cpp.
References te::common::FreeContents(), and m_regFunctions.
const te::da::SQLFunctionEncoder * te::da::SQLDialect::find | ( | const std::string & | funcName | ) | const |
It searches for an encoder for the given function.
funcName | The function name. |
Definition at line 46 of file SQLDialect.cpp.
References te::common::GetPValue().
std::vector< std::string > te::da::SQLDialect::getRegisteredNames | ( | ) | const |
It gets the all registered names from registed functions.
Definition at line 51 of file SQLDialect.cpp.
Referenced by te::qt::widgets::QueryDataSourceDialog::buildMap().
void te::da::SQLDialect::insert | ( | const std::string & | funcName, |
SQLFunctionEncoder * | encoder | ||
) |
It adds a new encoder for a given function.
funcName | The function name. |
encoder | The SQL dialect encoder for the given function. |
Exception | It thorws an exception if a given function is already registered. |
Definition at line 38 of file SQLDialect.cpp.
References te::common::GetPValue(), and TE_TR.
Referenced by te::serialize::xml::Read().
|
private |
A map from the TerraLib general name to a given SQL formatter.
Definition at line 96 of file SQLDialect.h.
Referenced by ~SQLDialect().