te::da::SQLFunctionEncoder Class Referenceabstract

A base class for encoders of SQL function expressions. More...

#include <SQLFunctionEncoder.h>

Inheritance diagram for te::da::SQLFunctionEncoder:
te::da::BinaryOpEncoder te::da::FunctionEncoder te::da::FunctionNoArgsEncoder te::da::TemplateEncoder te::da::UnaryOpEncoder

Public Member Functions

 SQLFunctionEncoder (const std::string &name)
 Constructor. More...
 
virtual void toSQL (const Function &f, std::string &buff, SQLVisitor &v) const =0
 It encodes the function to a SQL notation. More...
 
virtual ~SQLFunctionEncoder ()
 Virtual Destructor. More...
 

Protected Attributes

std::string m_name
 The alias to the function. More...
 

Detailed Description

A base class for encoders of SQL function expressions.

A Function is a named procedure that performs a distinct computation.

See also
Function, TemplateEncoder, BinaryOpEncoder, UnaryOpEncoder, FunctionEncoder

Definition at line 55 of file SQLFunctionEncoder.h.

Constructor & Destructor Documentation

te::da::SQLFunctionEncoder::SQLFunctionEncoder ( const std::string &  name)
inline

Constructor.

Parameters
nameThe function name.

Definition at line 64 of file SQLFunctionEncoder.h.

virtual te::da::SQLFunctionEncoder::~SQLFunctionEncoder ( )
inlinevirtual

Virtual Destructor.

Definition at line 67 of file SQLFunctionEncoder.h.

Member Function Documentation

virtual void te::da::SQLFunctionEncoder::toSQL ( const Function f,
std::string &  buff,
SQLVisitor v 
) const
pure virtual

It encodes the function to a SQL notation.

Subclasses must provide implementations for the many ways a function can be called in a database native language. For example, the '+' operator is called A + B, while the ST_Intersects function is called ST_Intersects(A, B).

Notice that this method will visit the expression arguments of a function.

Parameters
fThe function to be translated to a SQL notation.
buffThe destination string buffer where the translation will be written.
vThe SQL visitor that will be used to visit the arguments expression.

Implemented in te::da::TemplateEncoder, te::da::FunctionEncoder, te::da::BinaryOpEncoder, te::da::UnaryOpEncoder, and te::da::FunctionNoArgsEncoder.

Member Data Documentation

std::string te::da::SQLFunctionEncoder::m_name
protected

The alias to the function.

Definition at line 88 of file SQLFunctionEncoder.h.


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