27 #include "../../common/STLUtils.h" 
  370     m_limit(rhs.m_limit),
 
  371     m_offset(rhs.m_offset)
 
  390     m_limit(rhs->m_limit),
 
  391     m_offset(rhs->m_offset)
 
  431   m_fields.reset(
new Fields(f));
 
  453   assert(m_fields.get() != 0);
 
  455   m_fields->push_back(
new Field(f));
 
  462   assert(m_fields.get() != 0);
 
  464   m_fields->push_back(f);
 
  471   assert(m_fields.get() != 0);
 
  473   m_fields->push_back(
new Field(propertyName));
 
  480   assert(m_fields.get() != 0);
 
  482   m_fields->push_back(
new Field(propertyName, alias));
 
  489   if(m_from.get() == 0)
 
  490     m_from.reset(
new From);
 
  492   m_from->push_back(item.
clone());
 
  499   if(m_from.get() == 0)
 
  500     m_from.reset(
new From);
 
  502   m_from->push_back(item);
 
  509   if(m_from.get() == 0)
 
  510     m_from.reset(
new From);
 
  512   m_from->push_back(i1.
clone());
 
  513   m_from->push_back(i2.
clone());
 
  520   if(m_from.get() == 0)
 
  521     m_from.reset(
new From);
 
  523   m_from->push_back(i1);
 
  524   m_from->push_back(i2);
 
  531   if(m_from.get() == 0)
 
  532     m_from.reset(
new From);
 
  534   m_from->push_back(i1.
clone());
 
  535   m_from->push_back(i2.
clone());
 
  536   m_from->push_back(i3.
clone());
 
  543   if(m_from.get() == 0)
 
  544     m_from.reset(
new From);
 
  546   m_from->push_back(i1);
 
  547   m_from->push_back(i2);
 
  548   m_from->push_back(i3);
 
  555   if(m_from.get() == 0)
 
  556     m_from.reset(
new From);
 
  571   m_from.reset(
new From(rhs));
 
  657   if(m_where.get() == 0)
 
  658     m_where.reset(
new Where(e));
 
  667   if(m_where.get() == 0)
 
  668     m_where.reset(
new Where(e));
 
  683   m_where.reset(
new Where(rhs));
 
  699   if(m_groupBy.get() == 0)
 
  709   if(m_groupBy.get() == 0)
 
  712   m_groupBy->push_back(item);
 
  719   if(m_groupBy.get() == 0)
 
  729   if(m_groupBy.get() == 0)
 
  745   m_groupBy.reset(
new GroupBy(rhs));
 
  761   if(m_having.get() == 0)
 
  762     m_having.reset(
new Having(e));
 
  771   if(m_having.get() == 0)
 
  772     m_having.reset(
new Having(e));
 
  787   m_having.reset(
new Having(rhs));
 
  803   if(m_orderBy.get() == 0)
 
  813   if(m_orderBy.get() == 0)
 
  816   m_orderBy->push_back(item);
 
  823   if(m_orderBy.get() == 0)
 
  833   if(m_orderBy.get() == 0)
 
  849   m_orderBy.reset(
new OrderBy(rhs));
 
  865   if(m_distinct.get() == 0)
 
  868   m_distinct->push_back(e);
 
  875   if(m_distinct.get() == 0)
 
  878   m_distinct->push_back(e.
clone());
 
  885   if(m_distinct.get() == 0)
 
  901   m_distinct.reset(
new Distinct(rhs));
 
  934   return m_fields.get();
 
  954   return m_where.get();
 
  964   return m_groupBy.get();
 
  974   return m_having.get();
 
  984   return m_orderBy.get();
 
  994   return m_distinct.get();
 
std::auto_ptr< OrderBy > m_orderBy
 
virtual FromItem * clone() const =0
It creates a new copy of this FromItem. 
 
std::auto_ptr< Distinct > m_distinct
 
TE_DEFINE_VISITABLE Select()
Default constructor. 
 
Select & offset(std::size_t i)
 
Select & limit(std::size_t l)
 
void setWhere(Where *w)
It sets the filter codition. 
 
A class that models the name of a dataset used in a From clause. 
 
const Having * getHaving() const 
It returns the list of expressions used to eliminate group row that doesn't satisfy the condition...
 
void setOrderBy(OrderBy *o)
It sets the list of expressions used to sort the output result. 
 
Select & InnerJoin(FromItem *d2, JoinCondition *c)
 
A Select models a query to be used when retrieving data from a data source. 
 
A Select models a query to be used when retrieving data from a DataSource. 
 
Select & CrossJoin(FromItem *d2)
 
A class that can be used in an ORDER BY clause to sort the items of a resulting query. 
 
JoinType
The type of join in a query. 
 
A class that models a Distinct clause on a query. 
 
The Field class can be used to model an expression that takes part of the output items of a SELECT...
 
boost::ptr_vector< FromItem > From
It models the FROM clause for a query. 
 
Select & operator=(const Select &rhs)
 
A class that models the name of any property of an object. 
 
virtual Expression * clone() const =0
It creates a new copy of this expression. 
 
std::size_t getLimit() const 
It tells the maximum number of rows to return. 
 
void setGroupBy(GroupBy *g)
It sets the list of expressions used to condense the result set. 
 
A class that can be used to model a filter expression that can be applied to a query. 
 
A class that models the name of any property of an object. 
 
const From * getFrom() const 
It returns the list of source information to be used by the query. 
 
std::size_t getOffset() const 
It tells the number of rows to skip before starting to return rows. 
 
A class that can be used in an ORDER BY clause to sort the items of a resulting query. 
 
boost::ptr_vector< Field > Fields
Fields is just a boost::ptr_vector of Field pointers. 
 
Select & operator()(const Field &f)
 
Select & operator+(const te::da::From &f)
 
std::auto_ptr< Where > m_where
 
void setOffset(std::size_t o)
It specifies the number of rows to skip before starting to return rows. 
 
const Distinct * getDistinct() const 
It returns the Distinct modifier. 
 
void setLimit(std::size_t m)
It specifies the maximum number of rows to return. 
 
An abstract class that models a source of data in a query. 
 
A Query is independent from the data source language/dialect. 
 
void setFields(Fields *f)
It sets the list of output expressions used to form the result set. 
 
std::auto_ptr< Fields > m_fields
 
Select & NaturalJoin(FromItem *d2, JoinType t)
 
A class that can be used to model a filter expression that can be applied to a query. 
 
Select & FullOuterJoin(FromItem *d2, JoinCondition *c)
 
A Having is a filter expression that can be applied to a query with a group by clause. 
 
A class that models the name of a dataset used in a From clause. 
 
boost::ptr_vector< OrderByItem > OrderBy
A class that can be used to model an ORDER BY clause. 
 
A class that can be used in a GROUP BY clause. 
 
The Field class can be used to model an expression that takes part of the output items of a SELECT...
 
Query * clone() const 
It creates a new copy of this query. 
 
boost::ptr_vector< Expression > Distinct
A class that models a Distinct clause on a query. 
 
Select & Join(FromItem *d2, JoinType t, JoinCondition *c)
 
A class that can be used in a GROUP BY clause. 
 
A condition to be used in a Join clause. 
 
boost::ptr_vector< GroupByItem > GroupBy
A class that can be used to model a GROUP BY clause. 
 
void setDistinct(Distinct *d)
If Distinct is specified, all duplicate rows are removed from the result set (one row is kept from ea...
 
const GroupBy * getGroupBy() const 
It returns the list of expressions used to condense the result set. 
 
An abstract class that models a source of data in a query. 
 
Select & LeftJoin(FromItem *d2, JoinCondition *c)
 
This is an abstract class that models a query expression. 
 
This is an abstract class that models a query expression. 
 
const Fields * getFields() const 
It returns the list of output expressions used to form the result set. 
 
std::auto_ptr< From > m_from
 
const OrderBy * getOrderBy() const 
It returns the list of expressions used to sort the output result. 
 
Where * getWhere() const 
It returns the filter condition. 
 
void setHaving(Having *h)
It sets the list of expressions used to eliminate group row that doesn't satisfy the condition...
 
std::auto_ptr< GroupBy > m_groupBy
 
Select & RightJoin(FromItem *d2, JoinCondition *c)
 
A class that can be used to model a filter expression that can be applied to a query. 
 
void setFrom(From *f)
It sets the list of source information. 
 
std::auto_ptr< Having > m_having
 
SortOrder
Sort order type: asc or desc. 
 
void setExp(Expression *exp)
Sets the expression. 
 
void setExp(Expression *exp)
Sets the expression.