36 const std::string& pattern,
37 const std::string& wildCard,
38 const std::string& singleChar,
39 const std::string& escapeChar)
43 m_singleChar(singleChar),
44 m_escapeChar(escapeChar)
50 const std::string& pattern,
51 const std::string& wildCard,
52 const std::string& singleChar,
53 const std::string& escapeChar)
57 m_singleChar(singleChar),
58 m_escapeChar(escapeChar)
69 m_pattern(rhs.m_pattern),
70 m_wildCard(rhs.m_wildCard),
71 m_singleChar(rhs.m_singleChar),
72 m_escapeChar(rhs.m_escapeChar)
92 return new Like(*
this);
const std::string & getEscapeChar() const
It returns the escape character.
Expression * getString() const
It returns the string expression to be compared with the like operator.
void setPattern(const std::string &p)
It sets the pattern to be used in the comparison.
const std::string & getPattern()
It returns the pattern used in the comparison.
std::string m_escapeChar
The escape char character is used to escape the meaning of the wild card, single char and escape char...
It is intended to encode a character string comparison operator with pattern matching.
void setEscapeChar(const std::string &e)
It sets the escape character.
This is an abstract class that models a query expression.
Expression * clone() const
It creates a new copy of this expression.
const std::string & getWildCard() const
It returns the wild character.
TE_DEFINE_VISITABLE Like(Expression *str, const std::string &pattern, const std::string &wildCard="%", const std::string &singleChar="_", const std::string &escapeChar="\\")
Constructor.
void setWildCard(const std::string &w)
It sets the wild character.
It is intended to encode a character string comparison operator with pattern matching.
This is an abstract class that models a query expression.
A class that models a Function expression.
A class that models a Literal String value.
Like & operator=(const Like &rhs)
std::string m_pattern
The literal string pattern.
void setString(Expression *str)
It sets the string expression to be compared with the like operator.
const std::string & getSingleChar() const
It returns the single wild character.
A static class with global function name definitions.
Function & operator=(const Function &rhs)
virtual Expression * clone() const =0
It creates a new copy of this expression.
std::string m_singleChar
The single char character matches exactly one character.
std::vector< Expression * > m_args
The list of arguments.
void setSingleChar(const std::string &s)
It sets the wild single character.
A static class with global function name definitions.
std::string m_wildCard
The wild card character matches zero or more characters.