39 std::size_t len = t.length();
43 for(std::size_t i = 0; i < len; ++i)
49 if(chunk.empty() ==
false)
70 m_argIdx.push_back(atoi(idx.c_str()));
79 if(chunk.empty() ==
false)
88 std::size_t nchunks = m_chuncks.size();
89 std::size_t nargs = m_argIdx.size();
93 for(
size_t i = 0; i < nchunks; ++i)
103 buff += m_chuncks[i];
void toSQL(const Function &f, std::string &buff, SQLVisitor &v) const
It encodes the function to a SQL notation.
std::vector< std::size_t > m_argIdx
The arguments index.
A class that models a Function expression.
A base class for encoders of SQL function expressions.
A query encoder for functions that needs special translation.
A visitor for building an SQL statement from a given Query hierarchy.
std::vector< std::string > m_chuncks
We split the input template into some pieces and make them prepared to concatenate.
A class that models a Function expression.
virtual ReturnType accept(VisitorType &guest) const =0
It call the visit method from the guest object.
A visitor for building an SQL statement from a given Query hierarchy.
std::size_t getNumArgs() const
It returns the number of arguments informed to the function.
TemplateEncoder(const std::string &name, const std::string &t)
Constructor.