26#ifndef __TERRALIB_DATAACCESS_INTERNAL_SELECT_H
27#define __TERRALIB_DATAACCESS_INTERNAL_SELECT_H
113 Select(
const std::string& propertyName,
const std::string& alias);
#define TE_DEFINE_VISITABLE
A class that models a Distinct clause on a query.
The Fields class can be used to model a set of expressions that form the output items of a SELECT.
It models the FROM clause for a query.
A class that can be used to model a GROUP BY clause.
A class that can be used to model an ORDER BY clause.
The base class for queries.
This is an abstract class that models a query expression.
The Field class can be used to model an expression that takes part of the output items of a SELECT.
An abstract class that models a source of data in a query.
A class that can be used in a GROUP BY clause.
A class that can be used to model a filter expression that can be applied to a query.
A condition to be used in a Join clause.
A class that can be used in an ORDER BY clause to sort the items of a resulting query.
A Query is independent from the data source language/dialect.
A Select models a query to be used when retrieving data from a DataSource.
void setOffset(std::size_t o)
It specifies the number of rows to skip before starting to return rows.
Select & operator+(const te::da::OrderBy &o)
Select & where(const Where &rhs)
Select & having(const Having &rhs)
Query * clone() const
It creates a new copy of this query.
Select(const Fields &fds, const From &f, const Where &w)
Select & Join(const FromItem &d2, JoinType t, const JoinCondition &c)
Select(const Fields &fds, const From &f, const Where &w, const OrderBy &o)
Select & from(const FromItem &item)
std::size_t getLimit() const
It tells the maximum number of rows to return.
const Where & where() const
const OrderBy & orderBy() const
Select & operator+(const te::da::GroupBy &g)
Select & from(FromItem *item)
Select & groupBy(const Expression &e)
Select & operator+(const te::da::Where &w)
Select & operator()(const std::string &propertyName, const std::string &alias)
Select & orderBy(const Expression &e, SortOrder o=ASC)
Select & from(const std::string &datasetName)
Select & distinct(const Expression &e)
Select(const Fields &fds)
Select(const Fields &fds, const From &f, const Where &w, const GroupBy &gb)
Select(const Fields &fds, const From &f, const GroupBy &gb)
Select & LeftJoin(FromItem *d2, JoinCondition *c)
std::unique_ptr< Distinct > m_distinct
std::size_t getOffset() const
It tells the number of rows to skip before starting to return rows.
Select(const Select *rhs)
const GroupBy * getGroupBy() const
It returns the list of expressions used to condense the result set.
Select & InnerJoin(FromItem *d2, JoinCondition *c)
Select & having(Having *h)
void setWhere(Where *w)
It sets the filter codition.
Select(const Fields &fds, const From &f)
Select & operator()(const std::string &propertyName)
void setFields(Fields *f)
It sets the list of output expressions used to form the result set.
Select & FullOuterJoin(FromItem *d2, JoinCondition *c)
std::unique_ptr< Where > m_where
Select & fields(Fields *f)
Select(Fields *fds, From *f, GroupBy *gb, OrderBy *o=0)
Select & operator()(Field *f)
TE_DEFINE_VISITABLE Select()
Default constructor.
Select & distinct(const std::string &propertyName)
Select & having(const Expression &e)
Select & having(Expression *e)
Select & RightJoin(const FromItem &d2, const JoinCondition &c)
void setDistinct(Distinct *d)
If Distinct is specified, all duplicate rows are removed from the result set (one row is kept from ea...
const Fields * getFields() const
It returns the list of output expressions used to form the result set.
Select & InnerJoin(const FromItem &d2, const JoinCondition &c)
std::unique_ptr< GroupBy > m_groupBy
Select & orderBy(const OrderBy &rhs)
Select(const Fields &fds, const From &f, const GroupBy &gb, const OrderBy &o)
Select & orderBy(OrderByItem *item)
Select(const Select &rhs)
Select & NaturalJoin(FromItem *d2, JoinType t)
std::unique_ptr< From > m_from
Select & LeftJoin(const FromItem &d2, const JoinCondition &c)
Select & distinct(const Distinct &rhs)
Select & operator=(const Select &rhs)
Select & operator+(const te::da::From &f)
std::unique_ptr< OrderBy > m_orderBy
void setGroupBy(GroupBy *g)
It sets the list of expressions used to condense the result set.
Select & offset(std::size_t i)
const OrderBy * getOrderBy() const
It returns the list of expressions used to sort the output result.
Select & operator+(const te::da::Having &h)
Select & fields(const Fields &f)
Select & RightJoin(FromItem *d2, JoinCondition *c)
Select(const Fields &fds, const From &f, const Where &w, const GroupBy &gb, const OrderBy &o)
Select & operator+(te::da::GroupBy *g)
Select & from(const FromItem &i1, const FromItem &i2)
const Distinct & distinct() const
Select & from(const FromItem &i1, const FromItem &i2, const FromItem &i3)
const Fields & fields() const
Select & limit(std::size_t l)
Select & groupBy(const std::string &propertyName)
Select(Fields *fds, From *f, Where *w, GroupBy *gb, OrderBy *o=0)
Select(const Fields &fds, const From &f, const Where &w, const GroupBy &gb, const Having &h)
void setHaving(Having *h)
It sets the list of expressions used to eliminate group row that doesn't satisfy the condition.
Select & from(FromItem *i1, FromItem *i2)
Select(const Fields &fds, const From &f, const Where &w, const GroupBy &gb, const Having &h, const OrderBy &o)
Select & Join(FromItem *d2, JoinType t, JoinCondition *c)
Select(Fields *fds, From *f, Where *w, GroupBy *gb, Having *h, OrderBy *o=0)
Select & groupBy(const GroupByItem &item)
Where * getWhere() const
It returns the filter condition.
Select & from(FromItem *i1, FromItem *i2, FromItem *i3)
Select & operator+(te::da::OrderBy *o)
Select & where(const Expression &e)
Select & distinct(Distinct *d)
const GroupBy & groupBy() const
const Having * getHaving() const
It returns the list of expressions used to eliminate group row that doesn't satisfy the condition.
Select & distinct(Expression *e)
const From & from() const
Select & operator()(const Field &f)
const Having & having() const
Select & FullOuterJoin(const FromItem &d2, const JoinCondition &c)
Select & groupBy(GroupByItem *item)
Select & CrossJoin(const FromItem &d2)
Select(const Fields &fds, const From &f, const OrderBy &o)
const From * getFrom() const
It returns the list of source information to be used by the query.
Select & NaturalJoin(const FromItem &d2, JoinType t)
Select(const std::string &propertyName)
Select & operator+(te::da::From *f)
Select(const std::string &propertyName, const std::string &alias)
Select & where(Expression *e)
void setFrom(From *f)
It sets the list of source information.
Select(Fields *fds, From *f, OrderBy *o)
Select & CrossJoin(FromItem *d2)
Select & operator+(te::da::Having *h)
Select(Fields *fds, From *f=0, Where *w=0, OrderBy *o=0)
const Distinct * getDistinct() const
It returns the Distinct modifier.
Select & groupBy(GroupBy *gb)
Select & from(const From &rhs)
Select & orderBy(OrderBy *o)
Select & operator+(te::da::Where *w)
std::unique_ptr< Fields > m_fields
Select & orderBy(const OrderByItem &item)
void setOrderBy(OrderBy *o)
It sets the list of expressions used to sort the output result.
Select & groupBy(const GroupBy &rhs)
std::unique_ptr< Having > m_having
Select & orderBy(const std::string &propertyName, SortOrder o=ASC)
void setLimit(std::size_t m)
It specifies the maximum number of rows to return.
A class that can be used to model a filter expression that can be applied to a query.
boost::ptr_vector< Field > Fields
Fields is just a boost::ptr_vector of Field pointers.
boost::ptr_vector< GroupByItem > GroupBy
A class that can be used to model a GROUP BY clause.
boost::ptr_vector< FromItem > From
It models the FROM clause for a query.
JoinType
The type of join in a query.
SortOrder
Sort order type: asc or desc.
boost::ptr_vector< OrderByItem > OrderBy
A class that can be used to model an ORDER BY clause.
boost::ptr_vector< Expression > Distinct
A class that models a Distinct clause on a query.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.