A query encoder for binary operator expressions. More...
#include <TemplateEncoder.h>
Public Member Functions | |
TemplateEncoder (const std::string &name, const std::string &t) | |
Constructor. More... | |
void | toSQL (const Function &f, std::string &buff, SQLVisitor &v) const |
It encodes the function to a SQL notation. More... | |
~TemplateEncoder () | |
Destructor. More... | |
Protected Attributes | |
std::string | m_name |
The alias to the function. More... | |
Private Attributes | |
std::vector< std::size_t > | m_argIdx |
The arguments index. More... | |
std::vector< std::string > | m_chuncks |
We split the input template into some pieces and make them prepared to concatenate. More... | |
A query encoder for binary operator expressions.
You can use a special notation in order to translate the function arguments to a specific dialect convetion.
You can write an expression like: ($1 from $2 for $3) in order to write a function with arguments in differnt positions. The $n numbers will be used to map the arguments to its right place.
Definition at line 52 of file TemplateEncoder.h.
te::da::TemplateEncoder::TemplateEncoder | ( | const std::string & | name, |
const std::string & | t | ||
) |
Constructor.
name | The function alias name. |
t | The expression template. |
|
inline |
Destructor.
Definition at line 65 of file TemplateEncoder.h.
|
virtual |
It encodes the function to a SQL notation.
f | The function to be translated to a SQL notation. |
buff | The destination string buffer where the translation will be written. |
v | The SQL visitor that will be used to visit the arguments expression. |
Implements te::da::SQLFunctionEncoder.
|
private |
The arguments index.
Definition at line 81 of file TemplateEncoder.h.
|
private |
We split the input template into some pieces and make them prepared to concatenate.
Definition at line 80 of file TemplateEncoder.h.
|
protectedinherited |
The alias to the function.
Definition at line 88 of file SQLFunctionEncoder.h.