27 #include "../../common/StringUtils.h" 
   28 #include "../../common/Translator.h" 
   29 #include "../../datatype/AbstractData.h" 
   30 #include "../Exception.h" 
   74   if(visited.
getAlias().empty() == 
false)
 
   87   const std::string& fname = visited.
getName();
 
   92     throw Exception(
TE_TR(
"The informed function is not supported by this driver!"));
 
   94   encoder->
toSQL(visited, m_sql, *
this);
 
  105     m_sql += 
" NATURAL ";
 
  114       m_sql += 
" INNER JOIN ";
 
  118       m_sql += 
" LEFT JOIN ";
 
  122       m_sql += 
" RIGHT JOIN ";
 
  126       m_sql += 
" FULL OUTER JOIN ";
 
  130       m_sql += 
" CROSS JOIN ";
 
  134       m_sql += 
" NATURAL JOIN ";
 
  167   for(
size_t i = 0; i < ncols; ++i)
 
  173     visited[i]->
accept(*
this);
 
  307   if(visited.
getAlias().empty() == 
false)
 
  322   for(
size_t i = 0; i < visited.
getNumArgs(); ++i)
 
  328     visited[i]->
accept(*
this);
 
  342     m_sql += 
"DISTINCT ON("; 
 
  344     std::size_t ncols = visited.size();
 
  346     for(std::size_t i = 0; i < ncols; ++i)
 
  351       visited[i].accept(*
this);
 
  360   std::size_t size = visited.size();
 
  362   for(
size_t i = 0; i < size; ++i)
 
  367     visited[i].getExpression()->accept(*
this);
 
  369     if(visited[i].getAlias())
 
  370       m_sql += *(visited[i].getAlias());
 
  376   std::size_t size = visited.size();
 
  380   for(std::size_t i = 0; i < size; ++i)
 
  385     visited[i].accept(*
this);
 
  391   m_sql += 
"GROUP BY ";
 
  393   std::size_t ncols = visited.size();
 
  395   for(std::size_t i = 0; i < ncols; ++i)
 
  400     visited[i].getExpression()->accept(*
this);
 
  406   std::size_t size = visited.size();
 
  408   m_sql += 
"ORDER BY ";
 
  410   for(std::size_t i = 0; i < size; ++i)
 
  415     visited[i].getExpression()->accept(*
this);
 
const Distinct * getDistinct() const 
It returns the Distinct modifier. 
 
const std::string & getName() const 
It returns the property name. 
 
A class that models a Literal for a integer value. 
 
boost::ptr_vector< GroupByItem > GroupBy
A class that can be used to model a GROUP BY clause. 
 
const OrderBy * getOrderBy() const 
It returns the list of expressions used to sort the output result. 
 
An abstract class that models a source of data in a query. 
 
A class that models a Function expression. 
 
Select * getSelect() const 
It returns the associated subselect. 
 
virtual void visitDistinct(const Distinct &visited)
 
A class that models the name of a dataset used in a From clause. 
 
A class that models the name of any property of an object. 
 
const GroupBy * getGroupBy() const 
It returns the list of expressions used to condense the result set. 
 
boost::ptr_vector< Expression > Distinct
A class that models a Distinct clause on a query. 
 
A base class for encoders of SQL function expressions. 
 
A class that models the name of any property of an object. 
 
A class that represents the IN operator. 
 
A class that models a Literal Bool value. 
 
A class that models the name of a dataset used in a From clause. 
 
A class that models a Distinct clause on a query. 
 
This class models a bool Literal value. 
 
It represents the SQL query dialect accepted by a given data source. 
 
Expression * getCondition() const 
It returns a pointer to a join condition. 
 
boost::ptr_vector< OrderByItem > OrderBy
A class that can be used to model an ORDER BY clause. 
 
virtual std::string toString() const =0
It returns the data value in a string notation. 
 
JoinType getType() const 
It returns the join type. 
 
A class that models a literal for ByteArray values. 
 
#define TE_TR(message)
It marks a string in order to get translated. 
 
A visitor for building an SQL statement from a given Query hierarchy. 
 
const From * getFrom() const 
It returns the list of source information to be used by the query. 
 
This is an abstract class that models a query expression. 
 
A Join clause combines two FromItems. 
 
A class that models a literal for Date and Time values. 
 
JoinConditionOn is a boolean expression and it specifies which items in a join are considered to matc...
 
PropertyName * getPropertyName() const 
It returns the property name. 
 
bool isNatural() const 
It tells if the join is Natural. 
 
A Having is a filter expression that can be applied to a query with a group by clause. 
 
A class that models a literal for Date and Time values. 
 
const std::string & getAlias() const 
It returns the alias associated to the source item. 
 
This class models a literal value. 
 
virtual void visit(const Expression &visited)
 
A condition to be used in a Join clause. 
 
A class that models a Literal for a integer value. 
 
A class that models a literal for ByteArray values. 
 
A condition to be used in a Join clause. 
 
The Field class can be used to model an expression that takes part of the output items of a SELECT...
 
boost::ptr_vector< Field > Fields
Fields is just a boost::ptr_vector of Field pointers. 
 
A class that models a Literal for a integer value. 
 
This is an abstract class that models a query expression. 
 
Expression * getExp() const 
 
A class that models a Function expression. 
 
const Fields * getFields() const 
It returns the list of output expressions used to form the result set. 
 
A class that can be used in a GROUP BY clause. 
 
A Join clause combines two FromItems. 
 
Expression * getExp() const 
 
A class that models a literal for double values. 
 
A Select models a query to be used when retrieving data from a data source. 
 
std::size_t getNumFields() const 
It returns the number of fields in this join condition. 
 
const std::string & getName() const 
It returns the function name. 
 
A Select models a query to be used when retrieving data from a DataSource. 
 
JoinConditionUsing class can be used to model a USING clause in a Join. 
 
A class that can be used to model a GROUP BY clause. 
 
A class that can be used to model a filter expression that can be applied to a query. 
 
A class that models a Literal String value. 
 
boost::ptr_vector< FromItem > From
It models the FROM clause for a query. 
 
FromItem * getSecond() const 
It returns the second item involved in the join. 
 
Where * getWhere() const 
It returns the filter condition. 
 
A class that models a literal for double values. 
 
JoinCondition * getCondition() const 
It returns the join condition. 
 
JoinConditionUsing class can be used to model a USING clause in a Join. 
 
virtual ReturnType accept(VisitorType &guest) const =0
It call the visit method from the guest object. 
 
const Having * getHaving() const 
It returns the list of expressions used to eliminate group row that doesn't satisfy the condition...
 
A class that models a literal for Envelope values. 
 
const std::string & getName() const 
It returns the dataset name. 
 
A Select can be used as a source of information in another query. 
 
A class that represents the IN operator. 
 
JoinConditionOn is a boolean expression and it specifies which items in a join are considered to matc...
 
A class that can be used in an ORDER BY clause to sort the items of a resulting query. 
 
A Select can be used as a source of information in another query. 
 
A class that models a literal for Geometry values. 
 
te::dt::AbstractData * getValue() const 
It returns the value associated to the literal. 
 
A base class for encoders of SQL function expressions. 
 
A Query is independent from the data source language/dialect. 
 
std::size_t getNumArgs() const 
It returns the number of arguments informed to the function. 
 
virtual void toSQL(const Function &f, std::string &buff, SQLVisitor &v) const =0
It encodes the function to a SQL notation. 
 
FromItem * getFirst() const 
It returns the first from item involved in the join. 
 
A class that models a literal for Geometry values. 
 
This class models a literal value. 
 
This class models a string Literal value.