te::da::FunctionNoArgsEncoder Class Reference

An SQL encoder for functions with no arguments that is invoked just by its name. More...

#include <FunctionNoArgsEncoder.h>

Inheritance diagram for te::da::FunctionNoArgsEncoder:
te::da::SQLFunctionEncoder

Public Member Functions

 FunctionNoArgsEncoder (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...
 
 ~FunctionNoArgsEncoder ()
 Destructor. More...
 

Protected Attributes

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

Detailed Description

An SQL encoder for functions with no arguments that is invoked just by its name.

It encodes a function using just its name, following this convention: function-name.

See also
Function, TemplateEncoder, SQLFunctionEncoder, BinaryOpEncoder, UnaryOpEncoder, FunctionEncoder

Definition at line 45 of file FunctionNoArgsEncoder.h.

Constructor & Destructor Documentation

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

Constructor.

Parameters
nameThe function alias as understood by some data source implmentation.

Definition at line 54 of file FunctionNoArgsEncoder.h.

te::da::FunctionNoArgsEncoder::~FunctionNoArgsEncoder ( )
inline

Destructor.

Definition at line 57 of file FunctionNoArgsEncoder.h.

Member Function Documentation

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

It encodes the function to a SQL notation.

This method will encode the function in prefix unary operator notation: (op operand). For example, the '-' function is encoded as: -A.

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.

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: