Loading...
Searching...
No Matches
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.
 
Query * clone () const
 It creates a new copy of this query.
 
Select & CrossJoin (const FromItem &d2)
 
Select & CrossJoin (FromItem *d2)
 
Distinct & distinct ()
 
const Distinct & distinct () const
 
Select & distinct (const Distinct &rhs)
 
Select & distinct (const Expression &e)
 
Select & distinct (const std::string &propertyName)
 
Select & distinct (Distinct *d)
 
Select & distinct (Expression *e)
 
Fields & fields ()
 
const Fields & fields () const
 
Select & fields (const Fields &f)
 
Select & fields (Fields *f)
 
From & from ()
 
const From & from () const
 
Select & from (const From &rhs)
 
Select & from (const FromItem &i1, const FromItem &i2)
 
Select & from (const FromItem &i1, const FromItem &i2, const FromItem &i3)
 
Select & from (const FromItem &item)
 
Select & from (const std::string &datasetName)
 
Select & from (From *f)
 
Select & from (FromItem *i1, FromItem *i2)
 
Select & from (FromItem *i1, FromItem *i2, FromItem *i3)
 
Select & from (FromItem *item)
 
Select & FullOuterJoin (const FromItem &d2, const JoinCondition &c)
 
Select & FullOuterJoin (FromItem *d2, JoinCondition *c)
 
const Distinct * getDistinct () const
 It returns the Distinct modifier.
 
const Fields * getFields () const
 It returns the list of output expressions used to form the result set.
 
const From * getFrom () const
 It returns the list of source information to be used by the query.
 
const GroupBy * getGroupBy () const
 It returns the list of expressions used to condense the result set.
 
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.
 
std::size_t getOffset () const
 It tells the number of rows to skip before starting to return rows.
 
const OrderBy * getOrderBy () const
 It returns the list of expressions used to sort the output result.
 
Where * getWhere () const
 It returns the filter condition.
 
GroupBy & groupBy ()
 
const GroupBy & groupBy () const
 
Select & groupBy (const Expression &e)
 
Select & groupBy (const GroupBy &rhs)
 
Select & groupBy (const GroupByItem &item)
 
Select & groupBy (const std::string &propertyName)
 
Select & groupBy (GroupBy *gb)
 
Select & groupBy (GroupByItem *item)
 
Having & having ()
 
const Having & having () const
 
Select & having (const Expression &e)
 
Select & having (const Having &rhs)
 
Select & having (Expression *e)
 
Select & having (Having *h)
 
Select & InnerJoin (const FromItem &d2, const JoinCondition &c)
 
Select & InnerJoin (FromItem *d2, JoinCondition *c)
 
Select & Join (const FromItem &d2, JoinType t, const JoinCondition &c)
 
Select & Join (FromItem *d2, JoinType t, JoinCondition *c)
 
Select & LeftJoin (const FromItem &d2, const JoinCondition &c)
 
Select & LeftJoin (FromItem *d2, JoinCondition *c)
 
Select & limit (std::size_t l)
 
Select & NaturalJoin (const FromItem &d2, JoinType t)
 
Select & NaturalJoin (FromItem *d2, JoinType t)
 
Select & offset (std::size_t i)
 
Select & operator() (const Field &f)
 
Select & operator() (const std::string &propertyName)
 
Select & operator() (const std::string &propertyName, const std::string &alias)
 
Select & operator() (Field *f)
 
Select & operator+ (const te::da::From &f)
 
Select & operator+ (const te::da::GroupBy &g)
 
Select & operator+ (const te::da::Having &h)
 
Select & operator+ (const te::da::OrderBy &o)
 
Select & operator+ (const te::da::Where &w)
 
Select & operator+ (te::da::From *f)
 
Select & operator+ (te::da::GroupBy *g)
 
Select & operator+ (te::da::Having *h)
 
Select & operator+ (te::da::OrderBy *o)
 
Select & operator+ (te::da::Where *w)
 
Select & operator= (const Select &rhs)
 
OrderBy & orderBy ()
 
const OrderBy & orderBy () const
 
Select & orderBy (const Expression &e, SortOrder o=ASC)
 
Select & orderBy (const OrderBy &rhs)
 
Select & orderBy (const OrderByItem &item)
 
Select & orderBy (const std::string &propertyName, SortOrder o=ASC)
 
Select & orderBy (OrderBy *o)
 
Select & orderBy (OrderByItem *item)
 
Select & RightJoin (const FromItem &d2, const JoinCondition &c)
 
Select & RightJoin (FromItem *d2, JoinCondition *c)
 
TE_DEFINE_VISITABLE Select ()
 Default constructor.
 
 Select (const Field &f)
 
 Select (const Fields &fds)
 
 Select (const Fields &fds, const From &f)
 
 Select (const Fields &fds, const From &f, const GroupBy &gb)
 
 Select (const Fields &fds, const From &f, const GroupBy &gb, const OrderBy &o)
 
 Select (const Fields &fds, const From &f, const OrderBy &o)
 
 Select (const Fields &fds, const From &f, const Where &w)
 
 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 Having &h)
 
 Select (const Fields &fds, const From &f, const Where &w, const GroupBy &gb, const Having &h, const OrderBy &o)
 
 Select (const Fields &fds, const From &f, const Where &w, const GroupBy &gb, const OrderBy &o)
 
 Select (const Fields &fds, const From &f, const Where &w, const OrderBy &o)
 
 Select (const Select &rhs)
 
 Select (const Select *rhs)
 
 Select (const std::string &propertyName)
 
 Select (const std::string &propertyName, const std::string &alias)
 
 Select (Field *f)
 
 Select (Fields *fds, From *f, GroupBy *gb, OrderBy *o=0)
 
 Select (Fields *fds, From *f, OrderBy *o)
 
 Select (Fields *fds, From *f, Where *w, GroupBy *gb, Having *h, OrderBy *o=0)
 
 Select (Fields *fds, From *f, Where *w, GroupBy *gb, OrderBy *o=0)
 
 Select (Fields *fds, From *f=0, Where *w=0, OrderBy *o=0)
 
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).
 
void setFields (Fields *f)
 It sets the list of output expressions used to form the result set.
 
void setFrom (From *f)
 It sets the list of source information.
 
void setGroupBy (GroupBy *g)
 It sets the list of expressions used to condense the result set.
 
void setHaving (Having *h)
 It sets the list of expressions used to eliminate group row that doesn't satisfy the condition.
 
void setLimit (std::size_t m)
 It specifies the maximum number of rows to return.
 
void setOffset (std::size_t o)
 It specifies the number of rows to skip before starting to return rows.
 
void setOrderBy (OrderBy *o)
 It sets the list of expressions used to sort the output result.
 
void setWhere (Where *w)
 It sets the filter codition.
 
Where & where ()
 
const Where & where () const
 
Select & where (const Expression &e)
 
Select & where (const Where &rhs)
 
Select & where (Expression *e)
 
Select & where (Where *w)
 
 ~Select ()
 Destructor.
 

Private Attributes

std::unique_ptr< Distinct > m_distinct
 
std::unique_ptr< Fields > m_fields
 
std::unique_ptr< From > m_from
 
std::unique_ptr< GroupBy > m_groupBy
 
std::unique_ptr< Having > m_having
 
std::size_t m_limit
 
std::size_t m_offset
 
std::unique_ptr< OrderBy > m_orderBy
 
std::unique_ptr< Where > m_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 66 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

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

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 ( const FromItem &  d2)

◆ CrossJoin() [2/2]

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

◆ distinct() [1/7]

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

◆ distinct() [2/7]

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

◆ distinct() [3/7]

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

◆ distinct() [4/7]

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

◆ distinct() [5/7]

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

◆ distinct() [6/7]

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

◆ distinct() [7/7]

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

◆ fields() [1/4]

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

◆ fields() [2/4]

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

◆ fields() [3/4]

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

◆ fields() [4/4]

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

◆ from() [1/11]

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

◆ from() [2/11]

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

◆ from() [3/11]

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

◆ from() [4/11]

Select & te::da::Select::from ( const FromItem &  i1,
const 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 ( const FromItem &  item)

◆ 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 ( FromItem *  i1,
FromItem *  i2 
)

◆ from() [10/11]

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

◆ from() [11/11]

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

◆ FullOuterJoin() [1/2]

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

◆ FullOuterJoin() [2/2]

Select & te::da::Select::FullOuterJoin ( FromItem *  d2,
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]

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

◆ groupBy() [2/8]

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

◆ groupBy() [3/8]

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

◆ groupBy() [4/8]

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

◆ groupBy() [5/8]

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

◆ groupBy() [6/8]

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

◆ groupBy() [7/8]

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

◆ groupBy() [8/8]

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

◆ having() [1/6]

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

◆ having() [2/6]

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

◆ having() [3/6]

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

◆ having() [4/6]

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

◆ having() [5/6]

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

◆ having() [6/6]

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

◆ InnerJoin() [1/2]

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

◆ InnerJoin() [2/2]

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

◆ Join() [1/2]

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

◆ Join() [2/2]

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

◆ LeftJoin() [1/2]

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

◆ LeftJoin() [2/2]

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

◆ limit()

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

◆ NaturalJoin() [1/2]

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

◆ NaturalJoin() [2/2]

Select & te::da::Select::NaturalJoin ( 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() ( const std::string &  propertyName)

◆ operator()() [3/4]

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

◆ operator()() [4/4]

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

◆ operator+() [1/10]

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

◆ operator+() [2/10]

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

◆ operator+() [3/10]

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

◆ operator+() [4/10]

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

◆ operator+() [5/10]

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

◆ operator+() [6/10]

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

◆ operator+() [7/10]

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

◆ operator+() [8/10]

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

◆ operator+() [9/10]

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

◆ operator+() [10/10]

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

◆ operator=()

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

Assignment operator.

◆ orderBy() [1/8]

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

◆ orderBy() [2/8]

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

◆ orderBy() [3/8]

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

◆ orderBy() [4/8]

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

◆ orderBy() [5/8]

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

◆ orderBy() [6/8]

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

◆ orderBy() [7/8]

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

◆ orderBy() [8/8]

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

◆ RightJoin() [1/2]

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

◆ RightJoin() [2/2]

Select & te::da::Select::RightJoin ( FromItem *  d2,
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]

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

◆ where() [2/6]

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

◆ where() [3/6]

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

◆ where() [4/6]

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

◆ where() [5/6]

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

◆ where() [6/6]

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

Member Data Documentation

◆ m_distinct

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

Definition at line 445 of file Select.h.

◆ m_fields

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

Definition at line 439 of file Select.h.

◆ m_from

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

Definition at line 440 of file Select.h.

◆ m_groupBy

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

Definition at line 442 of file Select.h.

◆ m_having

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

Definition at line 443 of file Select.h.

◆ m_limit

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

Definition at line 446 of file Select.h.

◆ m_offset

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

Definition at line 447 of file Select.h.

◆ m_orderBy

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

Definition at line 444 of file Select.h.

◆ m_where

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

Definition at line 441 of file Select.h.


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