te::da::FunctionEncoder Class Reference

An SQL encoder for general function expressions. More...

#include <FunctionEncoder.h>

Inheritance diagram for te::da::FunctionEncoder:
te::da::SQLFunctionEncoder

Public Member Functions

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

Protected Attributes

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

Detailed Description

An SQL encoder for general function expressions.

It encodes a function expression using the following convetions:

  • for functions with no arguments: function-name()
  • for functions with 1 argument: function-name(arg)
  • for functions with more than 1 argument: function-name(arg1, arg2, ..., argn)
See also
Function, TemplateEncoder, AbstractOperatorEncoder, UnaryOperatorEncoder, FunctionEncoder, FunctionNoArgsEncoder

Definition at line 50 of file FunctionEncoder.h.

Constructor & Destructor Documentation

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

Constructor.

Parameters
nameFunction name.

Definition at line 58 of file FunctionEncoder.h.

te::da::FunctionEncoder::~FunctionEncoder ( )
inline

Destructor.

Definition at line 61 of file FunctionEncoder.h.

Member Function Documentation

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

It encodes the function to a SQL notation.

Parameters
fThe function to be translated to a SQL notation.
aliasThe function alias in the data source query language.
buffThe destination string buffer where the translation will be written.
vThe SQL visitor that will be used to visit the arguments expression.

Implements te::da::SQLFunctionEncoder.

Member Data Documentation

std::string te::da::SQLFunctionEncoder::m_name
protectedinherited

The alias to the function.

Definition at line 88 of file SQLFunctionEncoder.h.


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