A Join clause combines two FromItems. More...
#include <Join.h>
Public Types | |
typedef R | ReturnType |
typedef QueryVisitor | VisitorType |
Public Member Functions | |
virtual ReturnType | accept (VisitorType &guest) const =0 |
It call the visit method from the guest object. More... | |
FromItem * | clone () const |
It creates a new copy of this FromItem. More... | |
const std::string & | getAlias () const |
It returns the alias associated to the source item. More... | |
JoinCondition * | getCondition () const |
It returns the join condition. More... | |
FromItem * | getFirst () const |
It returns the first from item involved in the join. More... | |
FromItem * | getSecond () const |
It returns the second item involved in the join. More... | |
JoinType | getType () const |
It returns the join type. More... | |
bool | isNatural () const |
It tells if the join is Natural. More... | |
TE_DEFINE_VISITABLE | Join (FromItem *first, FromItem *second, JoinType t, JoinCondition *c) |
Constructor. More... | |
Join (const FromItem &first, const FromItem &second, JoinType t, const JoinCondition &c) | |
Constructor. More... | |
Join (const Join &rhs) | |
Copy constructor. More... | |
Join & | operator= (const Join &rhs) |
void | setAlias (const std::string &alias) |
It sets the alias for a from source item. More... | |
void | setCondition (JoinCondition *c) |
It sets the join condition. More... | |
void | setFirst (FromItem *item) |
It sets first item involved in the join. More... | |
void | setNatural (bool n) |
It marks if the join is a natural join. More... | |
void | setSecond (FromItem *item) |
It sets second item involved in the join. More... | |
void | setType (JoinType t) |
It sets join type. More... | |
~Join () | |
Destructor. More... | |
Protected Attributes | |
std::string | m_alias |
An alias for the output name. More... | |
Private Attributes | |
std::auto_ptr< JoinCondition > | m_condition |
The join condition. More... | |
std::auto_ptr< FromItem > | m_first |
The first item involved in the join. More... | |
bool | m_isNatural |
Natural is a shorthand for a JoinConditionUsing list that mentions all columns in the two tables that have the same names. More... | |
std::auto_ptr< FromItem > | m_second |
The first item involved in the join. More... | |
JoinType | m_type |
The join type. More... | |
A Join clause combines two FromItems.
|
inherited |
Definition at line 58 of file BaseVisitable.h.
|
inherited |
Definition at line 57 of file BaseVisitable.h.
te::da::Join::Join | ( | FromItem * | first, |
FromItem * | second, | ||
JoinType | t, | ||
JoinCondition * | c | ||
) |
te::da::Join::Join | ( | const FromItem & | first, |
const FromItem & | second, | ||
JoinType | t, | ||
const JoinCondition & | c | ||
) |
Constructor.
first | The first FromItem to be combined. |
second | The second FromItem to be combined. |
t | The join type. |
c | The join condition. |
Definition at line 40 of file Join.cpp.
References te::da::JoinCondition::clone(), te::da::FromItem::clone(), m_condition, m_first, and m_second.
te::da::Join::Join | ( | const Join & | rhs | ) |
Copy constructor.
Definition at line 53 of file Join.cpp.
References m_condition, m_first, and m_second.
|
pure virtualinherited |
It call the visit method from the guest object.
guest | The guest or visitor. |
|
virtual |
It creates a new copy of this FromItem.
Implements te::da::FromItem.
|
inherited |
It returns the alias associated to the source item.
Definition at line 47 of file FromItem.cpp.
Referenced by te::map::QueryLayer::getSchema(), te::serialize::xml::Save(), te::qt::widgets::DataSetWidget::setFrom(), and te::da::SQLVisitor::visit().
te::da::JoinCondition * te::da::Join::getCondition | ( | ) | const |
It returns the join condition.
Definition at line 121 of file Join.cpp.
Referenced by te::serialize::xml::Save(), te::ogr::SQLVisitor::visit(), and te::da::SQLVisitor::visit().
te::da::FromItem * te::da::Join::getFirst | ( | ) | const |
It returns the first from item involved in the join.
Definition at line 91 of file Join.cpp.
Referenced by te::map::QueryLayer::getSchema(), te::serialize::xml::Save(), te::ogr::SQLVisitor::visit(), and te::da::SQLVisitor::visit().
te::da::FromItem * te::da::Join::getSecond | ( | ) | const |
It returns the second item involved in the join.
Definition at line 101 of file Join.cpp.
Referenced by te::map::QueryLayer::getSchema(), te::serialize::xml::Save(), te::ogr::SQLVisitor::visit(), and te::da::SQLVisitor::visit().
te::da::JoinType te::da::Join::getType | ( | ) | const |
It returns the join type.
Definition at line 111 of file Join.cpp.
Referenced by te::serialize::xml::Save(), te::ogr::SQLVisitor::visit(), and te::da::SQLVisitor::visit().
|
inline |
It tells if the join is Natural.
Definition at line 141 of file Join.h.
Referenced by te::ogr::SQLVisitor::visit(), and te::da::SQLVisitor::visit().
te::da::Join & te::da::Join::operator= | ( | const Join & | rhs | ) |
Assignment operator.
Definition at line 70 of file Join.cpp.
References m_condition, m_first, m_isNatural, m_second, m_type, and te::da::FromItem::operator=().
|
inherited |
It sets the alias for a from source item.
alias | The alias for a from source item. |
Definition at line 42 of file FromItem.cpp.
void te::da::Join::setCondition | ( | JoinCondition * | c | ) |
void te::da::Join::setFirst | ( | FromItem * | item | ) |
|
inline |
void te::da::Join::setSecond | ( | FromItem * | item | ) |
void te::da::Join::setType | ( | JoinType | t | ) |
|
protectedinherited |
An alias for the output name.
Definition at line 93 of file FromItem.h.
Referenced by te::da::FromItem::operator=().
|
private |
|
private |
The first item involved in the join.
Definition at line 168 of file Join.h.
Referenced by Join(), and operator=().
|
private |
Natural is a shorthand for a JoinConditionUsing list that mentions all columns in the two tables that have the same names.
Definition at line 172 of file Join.h.
Referenced by operator=().
|
private |
The first item involved in the join.
Definition at line 169 of file Join.h.
Referenced by Join(), and operator=().
|
private |