te::da::SQLDialect Class Reference

It represents the SQL query dialect accepted by a given data source. More...

#include <SQLDialect.h>

Inheritance diagram for te::da::SQLDialect:

Public Member Functions

const SQLFunctionEncoderfind (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SQLDialect()

te::da::SQLDialect::SQLDialect ( )
inline

Default constructor.

Definition at line 60 of file SQLDialect.h.

◆ ~SQLDialect()

te::da::SQLDialect::~SQLDialect ( )

Destructor.

Member Function Documentation

◆ find()

const SQLFunctionEncoder* te::da::SQLDialect::find ( const std::string &  funcName) const

It searches for an encoder for the given function.

Parameters
funcNameThe function name.
Returns
An encoder or NULL if none is found.

◆ getRegisteredNames()

std::vector<std::string> te::da::SQLDialect::getRegisteredNames ( ) const

It gets the all registered names from registed functions.

Returns
A vector with TerraLib general name for SQL functions.

◆ insert()

void te::da::SQLDialect::insert ( const std::string &  funcName,
SQLFunctionEncoder encoder 
)

It adds a new encoder for a given function.

Parameters
funcNameThe function name.
encoderThe SQL dialect encoder for the given function.
Exceptions
ExceptionIt thorws an exception if a given function is already registered.
Note
The SQLDialect will take the ownership of the given encoder.

Member Data Documentation

◆ m_regFunctions

std::map<std::string, SQLFunctionEncoder*> te::da::SQLDialect::m_regFunctions
private

A map from the TerraLib general name to a given SQL formatter.

Definition at line 96 of file SQLDialect.h.


The documentation for this class was generated from the following file: