te::da::BinaryOpEncoder Class Reference

A query encoder for binary operations. More...

#include <BinaryOpEncoder.h>

Inheritance diagram for te::da::BinaryOpEncoder:

Public Member Functions

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

Protected Attributes

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

Detailed Description

A query encoder for binary operations.

It encodes a binary operator using the following convention: (arg1 op-name arg2).

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

Definition at line 45 of file BinaryOpEncoder.h.

Constructor & Destructor Documentation

te::da::BinaryOpEncoder::BinaryOpEncoder ( const std::string &  name)


nameAn alias to the operator name.

Definition at line 54 of file BinaryOpEncoder.h.

te::da::BinaryOpEncoder::~BinaryOpEncoder ( )


Definition at line 57 of file BinaryOpEncoder.h.

Member Function Documentation

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

It encodes the function to a SQL notation.

This method will encode the function in infix binary operator notation: (firstOperand op secondOperand). For example, the '+' function is encoded as: (A + B).

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

The alias to the function.

Definition at line 88 of file SQLFunctionEncoder.h.

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