te::da::Select Class Referenceabstract

A Select models a query to be used when retrieving data from a DataSource. More...

#include <Select.h>

Inheritance diagram for te::da::Select:
te::da::Query te::common::BaseVisitable< QueryVisitor >

Public Types

typedef void ReturnType
 
typedef QueryVisitor VisitorType
 

Public Member Functions

virtual ReturnType accept (VisitorType &guest) const=0
 It call the visit method from the guest object. More...
 
Queryclone () const
 It creates a new copy of this query. More...
 
SelectCrossJoin (FromItem *d2)
 
SelectCrossJoin (const FromItem &d2)
 
Selectdistinct (Expression *e)
 
Selectdistinct (const Expression &e)
 
Selectdistinct (const std::string &propertyName)
 
Selectdistinct (Distinct *d)
 
Selectdistinct (const Distinct &rhs)
 
Distinctdistinct ()
 
const Distinctdistinct () const
 
Selectfields (const Fields &f)
 
Selectfields (Fields *f)
 
Fieldsfields ()
 
const Fieldsfields () const
 
Selectfrom (const FromItem &item)
 
Selectfrom (FromItem *item)
 
Selectfrom (const FromItem &i1, const FromItem &i2)
 
Selectfrom (FromItem *i1, FromItem *i2)
 
Selectfrom (const FromItem &i1, const FromItem &i2, const FromItem &i3)
 
Selectfrom (FromItem *i1, FromItem *i2, FromItem *i3)
 
Selectfrom (const std::string &datasetName)
 
Selectfrom (From *f)
 
Selectfrom (const From &rhs)
 
Fromfrom ()
 
const Fromfrom () const
 
SelectFullOuterJoin (FromItem *d2, JoinCondition *c)
 
SelectFullOuterJoin (const FromItem &d2, const JoinCondition &c)
 
const DistinctgetDistinct () const
 It returns the Distinct modifier. More...
 
const FieldsgetFields () const
 It returns the list of output expressions used to form the result set. More...
 
const FromgetFrom () const
 It returns the list of source information to be used by the query. More...
 
const GroupBygetGroupBy () const
 It returns the list of expressions used to condense the result set. More...
 
const HavinggetHaving () const
 It returns the list of expressions used to eliminate group row that doesn't satisfy the condition. More...
 
std::size_t getLimit () const
 It tells the maximum number of rows to return. More...
 
std::size_t getOffset () const
 It tells the number of rows to skip before starting to return rows. More...
 
const OrderBygetOrderBy () const
 It returns the list of expressions used to sort the output result. More...
 
WheregetWhere () const
 It returns the filter condition. More...
 
SelectgroupBy (const GroupByItem &item)
 
SelectgroupBy (GroupByItem *item)
 
SelectgroupBy (const Expression &e)
 
SelectgroupBy (const std::string &propertyName)
 
SelectgroupBy (GroupBy *gb)
 
SelectgroupBy (const GroupBy &rhs)
 
GroupBygroupBy ()
 
const GroupBygroupBy () const
 
Selecthaving (Expression *e)
 
Selecthaving (const Expression &e)
 
Selecthaving (Having *h)
 
Selecthaving (const Having &rhs)
 
Havinghaving ()
 
const Havinghaving () const
 
SelectInnerJoin (FromItem *d2, JoinCondition *c)
 
SelectInnerJoin (const FromItem &d2, const JoinCondition &c)
 
SelectJoin (FromItem *d2, JoinType t, JoinCondition *c)
 
SelectJoin (const FromItem &d2, JoinType t, const JoinCondition &c)
 
SelectLeftJoin (FromItem *d2, JoinCondition *c)
 
SelectLeftJoin (const FromItem &d2, const JoinCondition &c)
 
Selectlimit (std::size_t l)
 
SelectNaturalJoin (FromItem *d2, JoinType t)
 
SelectNaturalJoin (const FromItem &d2, JoinType t)
 
Selectoffset (std::size_t i)
 
Selectoperator() (const Field &f)
 
Selectoperator() (Field *f)
 
Selectoperator() (const std::string &propertyName)
 
Selectoperator() (const std::string &propertyName, const std::string &alias)
 
Selectoperator+ (const te::da::From &f)
 
Selectoperator+ (te::da::From *f)
 
Selectoperator+ (const te::da::Where &w)
 
Selectoperator+ (te::da::Where *w)
 
Selectoperator+ (const te::da::GroupBy &g)
 
Selectoperator+ (te::da::GroupBy *g)
 
Selectoperator+ (const te::da::Having &h)
 
Selectoperator+ (te::da::Having *h)
 
Selectoperator+ (const te::da::OrderBy &o)
 
Selectoperator+ (te::da::OrderBy *o)
 
Selectoperator= (const Select &rhs)
 
SelectorderBy (const OrderByItem &item)
 
SelectorderBy (OrderByItem *item)
 
SelectorderBy (const Expression &e, SortOrder o=ASC)
 
SelectorderBy (const std::string &propertyName, SortOrder o=ASC)
 
SelectorderBy (OrderBy *o)
 
SelectorderBy (const OrderBy &rhs)
 
OrderByorderBy ()
 
const OrderByorderBy () const
 
SelectRightJoin (FromItem *d2, JoinCondition *c)
 
SelectRightJoin (const FromItem &d2, const JoinCondition &c)
 
TE_DEFINE_VISITABLE Select ()
 Default constructor. More...
 
 Select (Fields *fds, From *f=0, Where *w=0, OrderBy *o=0)
 
 Select (const Fields &fds)
 
 Select (const Fields &fds, const From &f)
 
 Select (const Fields &fds, const From &f, const Where &w)
 
 Select (const Fields &fds, const From &f, const Where &w, const OrderBy &o)
 
 Select (Fields *fds, From *f, OrderBy *o)
 
 Select (const Fields &fds, const From &f, const OrderBy &o)
 
 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)
 
 Select (const Fields &fds, const From &f, const Where &w, const GroupBy &gb, const OrderBy &o)
 
 Select (Fields *fds, From *f, GroupBy *gb, OrderBy *o=0)
 
 Select (const Fields &fds, const From &f, const GroupBy &gb)
 
 Select (const Fields &fds, const From &f, const GroupBy &gb, const OrderBy &o)
 
 Select (Fields *fds, From *f, Where *w, GroupBy *gb, Having *h, OrderBy *o=0)
 
 Select (const Fields &fds, const From &f, const Where &w, const GroupBy &gb, const Having &h)
 
 Select (const Fields &fds, const From &f, const Where &w, const GroupBy &gb, const Having &h, const OrderBy &o)
 
 Select (Field *f)
 
 Select (const Field &f)
 
 Select (const std::string &propertyName)
 
 Select (const std::string &propertyName, const std::string &alias)
 
 Select (const Select &rhs)
 
 Select (const Select *rhs)
 
void setDistinct (Distinct *d)
 If Distinct is specified, all duplicate rows are removed from the result set (one row is kept from each group of duplicates). More...
 
void setFields (Fields *f)
 It sets the list of output expressions used to form the result set. More...
 
void setFrom (From *f)
 It sets the list of source information. More...
 
void setGroupBy (GroupBy *g)
 It sets the list of expressions used to condense the result set. More...
 
void setHaving (Having *h)
 It sets the list of expressions used to eliminate group row that doesn't satisfy the condition. More...
 
void setLimit (std::size_t m)
 It specifies the maximum number of rows to return. More...
 
void setOffset (std::size_t o)
 It specifies the number of rows to skip before starting to return rows. More...
 
void setOrderBy (OrderBy *o)
 It sets the list of expressions used to sort the output result. More...
 
void setWhere (Where *w)
 It sets the filter codition. More...
 
Selectwhere (Expression *e)
 
Selectwhere (const Expression &e)
 
Selectwhere (Where *w)
 
Selectwhere (const Where &rhs)
 
Wherewhere ()
 
const Wherewhere () const
 
 ~Select ()
 Destructor. More...
 

Private Attributes

std::unique_ptr< Distinctm_distinct
 
std::unique_ptr< Fieldsm_fields
 
std::unique_ptr< Fromm_from
 
std::unique_ptr< GroupBym_groupBy
 
std::unique_ptr< Havingm_having
 
std::size_t m_limit
 
std::size_t m_offset
 
std::unique_ptr< OrderBym_orderBy
 
std::unique_ptr< Wherem_where
 

Detailed Description

A Select models a query to be used when retrieving data from a DataSource.

See also
Query, Fields, From, Expression, GroupBy, Expression, OrderBy, Distinct

Definition at line 65 of file Select.h.

Member Typedef Documentation

◆ ReturnType

typedef void te::common::BaseVisitable< QueryVisitor , void >::ReturnType
inherited

Definition at line 58 of file BaseVisitable.h.

◆ VisitorType

Definition at line 57 of file BaseVisitable.h.

Constructor & Destructor Documentation

◆ Select() [1/23]

TE_DEFINE_VISITABLE te::da::Select::Select ( )

Default constructor.

◆ Select() [2/23]

te::da::Select::Select ( Fields fds,
From f = 0,
Where w = 0,
OrderBy o = 0 
)

◆ Select() [3/23]

te::da::Select::Select ( const Fields fds)

◆ Select() [4/23]

te::da::Select::Select ( const Fields fds,
const From f 
)

◆ Select() [5/23]

te::da::Select::Select ( const Fields fds,
const From f,
const Where w 
)

◆ Select() [6/23]

te::da::Select::Select ( const Fields fds,
const From f,
const Where w,
const OrderBy o 
)

◆ Select() [7/23]

te::da::Select::Select ( Fields fds,
From f,
OrderBy o 
)

◆ Select() [8/23]

te::da::Select::Select ( const Fields fds,
const From f,
const OrderBy o 
)

◆ Select() [9/23]

te::da::Select::Select ( Fields fds,
From f,
Where w,
GroupBy gb,
OrderBy o = 0 
)

◆ Select() [10/23]

te::da::Select::Select ( const Fields fds,
const From f,
const Where w,
const GroupBy gb 
)

◆ Select() [11/23]

te::da::Select::Select ( const Fields fds,
const From f,
const Where w,
const GroupBy gb,
const OrderBy o 
)

◆ Select() [12/23]

te::da::Select::Select ( Fields fds,
From f,
GroupBy gb,
OrderBy o = 0 
)

◆ Select() [13/23]

te::da::Select::Select ( const Fields fds,
const From f,
const GroupBy gb 
)

◆ Select() [14/23]

te::da::Select::Select ( const Fields fds,
const From f,
const GroupBy gb,
const OrderBy o 
)

◆ Select() [15/23]

te::da::Select::Select ( Fields fds,
From f,
Where w,
GroupBy gb,
Having h,
OrderBy o = 0 
)

◆ Select() [16/23]

te::da::Select::Select ( const Fields fds,
const From f,
const Where w,
const GroupBy gb,
const Having h 
)

◆ Select() [17/23]

te::da::Select::Select ( const Fields fds,
const From f,
const Where w,
const GroupBy gb,
const Having h,
const OrderBy o 
)

◆ Select() [18/23]

te::da::Select::Select ( Field f)

◆ Select() [19/23]

te::da::Select::Select ( const Field f)

◆ Select() [20/23]

te::da::Select::Select ( const std::string &  propertyName)

◆ Select() [21/23]

te::da::Select::Select ( const std::string &  propertyName,
const std::string &  alias 
)

◆ Select() [22/23]

te::da::Select::Select ( const Select rhs)

◆ Select() [23/23]

te::da::Select::Select ( const Select rhs)

◆ ~Select()

te::da::Select::~Select ( )

Destructor.

Member Function Documentation

◆ accept()

virtual ReturnType te::common::BaseVisitable< QueryVisitor , void >::accept ( VisitorType guest) const
pure virtualinherited

It call the visit method from the guest object.

Parameters
guestThe guest or visitor.
Returns
Any valid value define by the template type R.

◆ clone()

Query* te::da::Select::clone ( ) const
virtual

It creates a new copy of this query.

Implements te::da::Query.

◆ CrossJoin() [1/2]

Select& te::da::Select::CrossJoin ( FromItem d2)

◆ CrossJoin() [2/2]

Select& te::da::Select::CrossJoin ( const FromItem d2)

◆ distinct() [1/7]

Select& te::da::Select::distinct ( Expression e)

◆ distinct() [2/7]

Select& te::da::Select::distinct ( const Expression e)

◆ distinct() [3/7]

Select& te::da::Select::distinct ( const std::string &  propertyName)

◆ distinct() [4/7]

Select& te::da::Select::distinct ( Distinct d)

◆ distinct() [5/7]

Select& te::da::Select::distinct ( const Distinct rhs)

◆ distinct() [6/7]

Distinct& te::da::Select::distinct ( )

◆ distinct() [7/7]

const Distinct& te::da::Select::distinct ( ) const

◆ fields() [1/4]

Select& te::da::Select::fields ( const Fields f)

◆ fields() [2/4]

Select& te::da::Select::fields ( Fields f)

◆ fields() [3/4]

Fields& te::da::Select::fields ( )

◆ fields() [4/4]

const Fields& te::da::Select::fields ( ) const

◆ from() [1/11]

Select& te::da::Select::from ( const FromItem item)

◆ from() [2/11]

Select& te::da::Select::from ( FromItem item)

◆ from() [3/11]

Select& te::da::Select::from ( const FromItem i1,
const FromItem i2 
)

◆ from() [4/11]

Select& te::da::Select::from ( FromItem i1,
FromItem i2 
)

◆ from() [5/11]

Select& te::da::Select::from ( const FromItem i1,
const FromItem i2,
const FromItem i3 
)

◆ from() [6/11]

Select& te::da::Select::from ( FromItem i1,
FromItem i2,
FromItem i3 
)

◆ from() [7/11]

Select& te::da::Select::from ( const std::string &  datasetName)

◆ from() [8/11]

Select& te::da::Select::from ( From f)

◆ from() [9/11]

Select& te::da::Select::from ( const From rhs)

◆ from() [10/11]

From& te::da::Select::from ( )

◆ from() [11/11]

const From& te::da::Select::from ( ) const

◆ FullOuterJoin() [1/2]

Select& te::da::Select::FullOuterJoin ( FromItem d2,
JoinCondition c 
)

◆ FullOuterJoin() [2/2]

Select& te::da::Select::FullOuterJoin ( const FromItem d2,
const JoinCondition c 
)

◆ getDistinct()

const Distinct* te::da::Select::getDistinct ( ) const

It returns the Distinct modifier.

Returns
The Distinct modifier.

◆ getFields()

const Fields* te::da::Select::getFields ( ) const

It returns the list of output expressions used to form the result set.

Returns
The list of output expressions used to form the result set.

◆ getFrom()

const From* te::da::Select::getFrom ( ) const

It returns the list of source information to be used by the query.

Returns
The list of source information to be used by the query.

◆ getGroupBy()

const GroupBy* te::da::Select::getGroupBy ( ) const

It returns the list of expressions used to condense the result set.

Returns
The list of expressions used to condense the result set.

◆ getHaving()

const Having* te::da::Select::getHaving ( ) const

It returns the list of expressions used to eliminate group row that doesn't satisfy the condition.

Returns
The list of expressions used to eliminate group row that doesn't satisfy the condition.

◆ getLimit()

std::size_t te::da::Select::getLimit ( ) const

It tells the maximum number of rows to return.

Returns
The maximum number of rows to return.

◆ getOffset()

std::size_t te::da::Select::getOffset ( ) const

It tells the number of rows to skip before starting to return rows.

Returns
The number of rows to skip before starting to return rows.

◆ getOrderBy()

const OrderBy* te::da::Select::getOrderBy ( ) const

It returns the list of expressions used to sort the output result.

Returns
The list of expressions used to sort the output result.

◆ getWhere()

Where* te::da::Select::getWhere ( ) const

It returns the filter condition.

Returns
The filter condition.

◆ groupBy() [1/8]

Select& te::da::Select::groupBy ( const GroupByItem item)

◆ groupBy() [2/8]

Select& te::da::Select::groupBy ( GroupByItem item)

◆ groupBy() [3/8]

Select& te::da::Select::groupBy ( const Expression e)

◆ groupBy() [4/8]

Select& te::da::Select::groupBy ( const std::string &  propertyName)

◆ groupBy() [5/8]

Select& te::da::Select::groupBy ( GroupBy gb)

◆ groupBy() [6/8]

Select& te::da::Select::groupBy ( const GroupBy rhs)

◆ groupBy() [7/8]

GroupBy& te::da::Select::groupBy ( )

◆ groupBy() [8/8]

const GroupBy& te::da::Select::groupBy ( ) const

◆ having() [1/6]

Select& te::da::Select::having ( Expression e)

◆ having() [2/6]

Select& te::da::Select::having ( const Expression e)

◆ having() [3/6]

Select& te::da::Select::having ( Having h)

◆ having() [4/6]

Select& te::da::Select::having ( const Having rhs)

◆ having() [5/6]

Having& te::da::Select::having ( )

◆ having() [6/6]

const Having& te::da::Select::having ( ) const

◆ InnerJoin() [1/2]

Select& te::da::Select::InnerJoin ( FromItem d2,
JoinCondition c 
)

◆ InnerJoin() [2/2]

Select& te::da::Select::InnerJoin ( const FromItem d2,
const JoinCondition c 
)

◆ Join() [1/2]

Select& te::da::Select::Join ( FromItem d2,
JoinType  t,
JoinCondition c 
)

◆ Join() [2/2]

Select& te::da::Select::Join ( const FromItem d2,
JoinType  t,
const JoinCondition c 
)

◆ LeftJoin() [1/2]

Select& te::da::Select::LeftJoin ( FromItem d2,
JoinCondition c 
)

◆ LeftJoin() [2/2]

Select& te::da::Select::LeftJoin ( const FromItem d2,
const JoinCondition c 
)

◆ limit()

Select& te::da::Select::limit ( std::size_t  l)

◆ NaturalJoin() [1/2]

Select& te::da::Select::NaturalJoin ( FromItem d2,
JoinType  t 
)

◆ NaturalJoin() [2/2]

Select& te::da::Select::NaturalJoin ( const FromItem d2,
JoinType  t 
)

◆ offset()

Select& te::da::Select::offset ( std::size_t  i)

◆ operator()() [1/4]

Select& te::da::Select::operator() ( const Field f)

◆ operator()() [2/4]

Select& te::da::Select::operator() ( Field f)

◆ operator()() [3/4]

Select& te::da::Select::operator() ( const std::string &  propertyName)

◆ operator()() [4/4]

Select& te::da::Select::operator() ( const std::string &  propertyName,
const std::string &  alias 
)

◆ operator+() [1/10]

Select& te::da::Select::operator+ ( const te::da::From f)

◆ operator+() [2/10]

Select& te::da::Select::operator+ ( te::da::From f)

◆ operator+() [3/10]

Select& te::da::Select::operator+ ( const te::da::Where w)

◆ operator+() [4/10]

Select& te::da::Select::operator+ ( te::da::Where w)

◆ operator+() [5/10]

Select& te::da::Select::operator+ ( const te::da::GroupBy g)

◆ operator+() [6/10]

Select& te::da::Select::operator+ ( te::da::GroupBy g)

◆ operator+() [7/10]

Select& te::da::Select::operator+ ( const te::da::Having h)

◆ operator+() [8/10]

Select& te::da::Select::operator+ ( te::da::Having h)

◆ operator+() [9/10]

Select& te::da::Select::operator+ ( const te::da::OrderBy o)

◆ operator+() [10/10]

Select& te::da::Select::operator+ ( te::da::OrderBy o)

◆ operator=()

Select& te::da::Select::operator= ( const Select rhs)

Assignment operator.

◆ orderBy() [1/8]

Select& te::da::Select::orderBy ( const OrderByItem item)

◆ orderBy() [2/8]

Select& te::da::Select::orderBy ( OrderByItem item)

◆ orderBy() [3/8]

Select& te::da::Select::orderBy ( const Expression e,
SortOrder  o = ASC 
)

◆ orderBy() [4/8]

Select& te::da::Select::orderBy ( const std::string &  propertyName,
SortOrder  o = ASC 
)

◆ orderBy() [5/8]

Select& te::da::Select::orderBy ( OrderBy o)

◆ orderBy() [6/8]

Select& te::da::Select::orderBy ( const OrderBy rhs)

◆ orderBy() [7/8]

OrderBy& te::da::Select::orderBy ( )

◆ orderBy() [8/8]

const OrderBy& te::da::Select::orderBy ( ) const

◆ RightJoin() [1/2]

Select& te::da::Select::RightJoin ( FromItem d2,
JoinCondition c 
)

◆ RightJoin() [2/2]

Select& te::da::Select::RightJoin ( const FromItem d2,
const JoinCondition c 
)

◆ setDistinct()

void te::da::Select::setDistinct ( Distinct d)

If Distinct is specified, all duplicate rows are removed from the result set (one row is kept from each group of duplicates).

Parameters
dThe Distinct modifier.
Note
Select will take the ownership of Distinct.

◆ setFields()

void te::da::Select::setFields ( Fields f)

It sets the list of output expressions used to form the result set.

Parameters
fThe list of output expressions used to form the result set.
Note
Select will take the ownership of Fields.

◆ setFrom()

void te::da::Select::setFrom ( From f)

It sets the list of source information.

Parameters
fThe list of source information.
Note
Select will take the ownership of From.

◆ setGroupBy()

void te::da::Select::setGroupBy ( GroupBy g)

It sets the list of expressions used to condense the result set.

Parameters
gThe list of expressions used to condense the result set.
Note
Select will take the ownership of GroupBy.

◆ setHaving()

void te::da::Select::setHaving ( Having h)

It sets the list of expressions used to eliminate group row that doesn't satisfy the condition.

Parameters
hThe list of expressions used to eliminate group row that doesn't satisfy the condition.
Note
Select will take the ownership of Having.

◆ setLimit()

void te::da::Select::setLimit ( std::size_t  m)

It specifies the maximum number of rows to return.

Parameters
mThe maximum number of rows to return.

◆ setOffset()

void te::da::Select::setOffset ( std::size_t  o)

It specifies the number of rows to skip before starting to return rows.

Parameters
oThe number of rows to skip before starting to return rows.

◆ setOrderBy()

void te::da::Select::setOrderBy ( OrderBy o)

It sets the list of expressions used to sort the output result.

Parameters
oThe list of expressions used to sort the output result.
Note
Select will take the ownership of OrderBy.

◆ setWhere()

void te::da::Select::setWhere ( Where w)

It sets the filter codition.

Parameters
wThe filter condition.
Note
Select will take the ownership of Where.

◆ where() [1/6]

Select& te::da::Select::where ( Expression e)

◆ where() [2/6]

Select& te::da::Select::where ( const Expression e)

◆ where() [3/6]

Select& te::da::Select::where ( Where w)

◆ where() [4/6]

Select& te::da::Select::where ( const Where rhs)

◆ where() [5/6]

Where& te::da::Select::where ( )

◆ where() [6/6]

const Where& te::da::Select::where ( ) const

Member Data Documentation

◆ m_distinct

std::unique_ptr<Distinct> te::da::Select::m_distinct
private

Definition at line 444 of file Select.h.

◆ m_fields

std::unique_ptr<Fields> te::da::Select::m_fields
private

Definition at line 438 of file Select.h.

◆ m_from

std::unique_ptr<From> te::da::Select::m_from
private

Definition at line 439 of file Select.h.

◆ m_groupBy

std::unique_ptr<GroupBy> te::da::Select::m_groupBy
private

Definition at line 441 of file Select.h.

◆ m_having

std::unique_ptr<Having> te::da::Select::m_having
private

Definition at line 442 of file Select.h.

◆ m_limit

std::size_t te::da::Select::m_limit
private

Definition at line 445 of file Select.h.

◆ m_offset

std::size_t te::da::Select::m_offset
private

Definition at line 446 of file Select.h.

◆ m_orderBy

std::unique_ptr<OrderBy> te::da::Select::m_orderBy
private

Definition at line 443 of file Select.h.

◆ m_where

std::unique_ptr<Where> te::da::Select::m_where
private

Definition at line 440 of file Select.h.


The documentation for this class was generated from the following file: