27 #include "../../common/STLUtils.h" 225 const std::string& alias)
341 if(
m_from.get() ==
nullptr)
351 if(
m_from.get() ==
nullptr)
361 if(
m_from.get() ==
nullptr)
372 if(
m_from.get() ==
nullptr)
383 if(
m_from.get() ==
nullptr)
395 if(
m_from.get() ==
nullptr)
407 if(
m_from.get() ==
nullptr)
A class that can be used to model a filter expression that can be applied to a query.
const Distinct * getDistinct() const
It returns the Distinct modifier.
std::unique_ptr< Having > m_having
boost::ptr_vector< GroupByItem > GroupBy
A class that can be used to model a GROUP BY clause.
An abstract class that models a source of data in a query.
const OrderBy * getOrderBy() const
It returns the list of expressions used to sort the output result.
A class that can be used in a GROUP BY clause.
An abstract class that models a source of data in a query.
The Field class can be used to model an expression that takes part of the output items of a SELECT...
std::unique_ptr< Distinct > m_distinct
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 class that models the name of any property of an object.
virtual Expression * clone() const =0
It creates a new copy of this expression.
A class that models the name of a dataset used in a From clause.
A class that models a Distinct clause on a query.
boost::ptr_vector< OrderByItem > OrderBy
A class that can be used to model an ORDER BY clause.
void setLimit(std::size_t m)
It specifies the maximum number of rows to return.
Select & LeftJoin(FromItem *d2, JoinCondition *c)
TE_DEFINE_VISITABLE Select()
Default constructor.
Select & operator()(const Field &f)
Select & FullOuterJoin(FromItem *d2, JoinCondition *c)
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.
virtual FromItem * clone() const =0
It creates a new copy of this FromItem.
void setWhere(Where *w)
It sets the filter codition.
A Having is a filter expression that can be applied to a query with a group by clause.
Select & NaturalJoin(FromItem *d2, JoinType t)
Select & InnerJoin(FromItem *d2, JoinCondition *c)
A condition to be used in a Join clause.
static te::dt::DateTime d(2010, 8, 9, 15, 58, 39)
boost::ptr_vector< Field > Fields
Fields is just a boost::ptr_vector of Field pointers.
JoinType
The type of join in a query.
Select & CrossJoin(FromItem *d2)
void setDistinct(Distinct *d)
If Distinct is specified, all duplicate rows are removed from the result set (one row is kept from ea...
A class that can be used to model a filter expression that can be applied to a query.
This is an abstract class that models a query expression.
std::size_t getOffset() const
It tells the number of rows to skip before starting to return rows.
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.
Query * clone() const
It creates a new copy of this query.
A Select models a query to be used when retrieving data from a data source.
SortOrder
Sort order type: asc or desc.
void setGroupBy(GroupBy *g)
It sets the list of expressions used to condense the result set.
void setOrderBy(OrderBy *o)
It sets the list of expressions used to sort the output result.
std::unique_ptr< Fields > m_fields
Select & operator=(const Select &rhs)
A Select models a query to be used when retrieving data from a DataSource.
A class that can be used to model a filter expression that can be applied to a query.
boost::ptr_vector< FromItem > From
It models the FROM clause for a query.
void setOffset(std::size_t o)
It specifies the number of rows to skip before starting to return rows.
std::unique_ptr< From > m_from
Where * getWhere() const
It returns the filter condition.
std::unique_ptr< OrderBy > m_orderBy
std::unique_ptr< Where > m_where
const Having * getHaving() const
It returns the list of expressions used to eliminate group row that doesn't satisfy the condition...
std::size_t getLimit() const
It tells the maximum number of rows to return.
void setHaving(Having *h)
It sets the list of expressions used to eliminate group row that doesn't satisfy the condition...
The Field class can be used to model an expression that takes part of the output items of a SELECT...
Select & limit(std::size_t l)
A class that can be used in an ORDER BY clause to sort the items of a resulting query.
A class that can be used in an ORDER BY clause to sort the items of a resulting query.
Select & offset(std::size_t i)
std::unique_ptr< GroupBy > m_groupBy
Select & RightJoin(FromItem *d2, JoinCondition *c)
Select & operator+(const te::da::From &f)
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.
Select & Join(FromItem *d2, JoinType t, JoinCondition *c)
void setFrom(From *f)
It sets the list of source information.