QGIS API Documentation  2.18.3-Las Palmas (77b8c3d)
Public Member Functions | Protected Attributes | List of all members
QgsSQLStatement::NodeSelect Class Reference

SELECT node. More...

#include <qgssqlstatement.h>

Inheritance diagram for QgsSQLStatement::NodeSelect:
Inheritance graph
[legend]

Public Member Functions

 NodeSelect (QList< NodeTableDef * > tableList, QList< NodeSelectedColumn * > columns, bool distinct)
 Constructor. More...
 
virtual ~NodeSelect ()
 
virtual void accept (Visitor &v) const override
 Support the visitor pattern. More...
 
void appendJoin (NodeJoin *join)
 Append a join. More...
 
virtual Nodeclone () const override
 Generate a clone of this node. More...
 
QList< NodeSelectedColumn * > columns () const
 Return the list of columns. More...
 
bool distinct () const
 Return if the SELECT is DISTINCT. More...
 
virtual QString dump () const override
 Abstract virtual dump method. More...
 
QList< NodeJoin * > joins () const
 Return the list of joins. More...
 
virtual NodeType nodeType () const override
 Abstract virtual that returns the type of this node. More...
 
QList< NodeColumnSorted * > orderBy () const
 Return the list of order by columns. More...
 
void setJoins (QList< NodeJoin * > joins)
 Set joins. More...
 
void setOrderBy (QList< NodeColumnSorted * > orderBy)
 Set order by columns. More...
 
void setWhere (Node *where)
 Set where clause. More...
 
QList< NodeTableDef * > tables () const
 Return the list of tables. More...
 
Nodewhere () const
 Return the where clause. More...
 
- Public Member Functions inherited from QgsSQLStatement::Node
virtual ~Node ()
 

Protected Attributes

QList< NodeSelectedColumn * > mColumns
 
bool mDistinct
 
QList< NodeJoin * > mJoins
 
QList< NodeColumnSorted * > mOrderBy
 
QList< NodeTableDef * > mTableList
 
NodemWhere
 

Detailed Description

SELECT node.

Definition at line 642 of file qgssqlstatement.h.

Constructor & Destructor Documentation

QgsSQLStatement::NodeSelect::NodeSelect ( QList< NodeTableDef * >  tableList,
QList< NodeSelectedColumn * >  columns,
bool  distinct 
)
inline

Constructor.

Definition at line 646 of file qgssqlstatement.h.

virtual QgsSQLStatement::NodeSelect::~NodeSelect ( )
inlinevirtual

Definition at line 647 of file qgssqlstatement.h.

Member Function Documentation

virtual void QgsSQLStatement::NodeSelect::accept ( Visitor v) const
inlineoverridevirtual

Support the visitor pattern.

For any implementation this should look like

C++:

v.visit( *this );

Python:

v.visit( self)
Parameters
vA visitor that visits this node.

Implements QgsSQLStatement::Node.

Definition at line 674 of file qgssqlstatement.h.

void QgsSQLStatement::NodeSelect::appendJoin ( NodeJoin join)
inline

Append a join.

Definition at line 652 of file qgssqlstatement.h.

QgsSQLStatement::Node * QgsSQLStatement::NodeSelect::clone ( ) const
overridevirtual

Generate a clone of this node.

Make sure that the clone does not contain any information which is generated in prepare and context related. Ownership is transferred to the caller.

Returns
a deep copy of this node.

Implements QgsSQLStatement::Node.

Definition at line 596 of file qgssqlstatement.cpp.

QList<NodeSelectedColumn*> QgsSQLStatement::NodeSelect::columns ( ) const
inline

Return the list of columns.

Definition at line 661 of file qgssqlstatement.h.

bool QgsSQLStatement::NodeSelect::distinct ( ) const
inline

Return if the SELECT is DISTINCT.

Definition at line 663 of file qgssqlstatement.h.

QString QgsSQLStatement::NodeSelect::dump ( ) const
overridevirtual

Abstract virtual dump method.

Returns
A statement which represents this node as string

Implements QgsSQLStatement::Node.

Definition at line 549 of file qgssqlstatement.cpp.

QList<NodeJoin*> QgsSQLStatement::NodeSelect::joins ( ) const
inline

Return the list of joins.

Definition at line 665 of file qgssqlstatement.h.

virtual NodeType QgsSQLStatement::NodeSelect::nodeType ( ) const
inlineoverridevirtual

Abstract virtual that returns the type of this node.

Returns
The type of this node

Implements QgsSQLStatement::Node.

Definition at line 671 of file qgssqlstatement.h.

QList<NodeColumnSorted*> QgsSQLStatement::NodeSelect::orderBy ( ) const
inline

Return the list of order by columns.

Definition at line 669 of file qgssqlstatement.h.

void QgsSQLStatement::NodeSelect::setJoins ( QList< NodeJoin * >  joins)
inline

Set joins.

Definition at line 650 of file qgssqlstatement.h.

void QgsSQLStatement::NodeSelect::setOrderBy ( QList< NodeColumnSorted * >  orderBy)
inline

Set order by columns.

Definition at line 656 of file qgssqlstatement.h.

void QgsSQLStatement::NodeSelect::setWhere ( Node where)
inline

Set where clause.

Definition at line 654 of file qgssqlstatement.h.

QList<NodeTableDef*> QgsSQLStatement::NodeSelect::tables ( ) const
inline

Return the list of tables.

Definition at line 659 of file qgssqlstatement.h.

Node* QgsSQLStatement::NodeSelect::where ( ) const
inline

Return the where clause.

Definition at line 667 of file qgssqlstatement.h.

Member Data Documentation

QList<NodeSelectedColumn*> QgsSQLStatement::NodeSelect::mColumns
protected

Definition at line 679 of file qgssqlstatement.h.

bool QgsSQLStatement::NodeSelect::mDistinct
protected

Definition at line 680 of file qgssqlstatement.h.

QList<NodeJoin*> QgsSQLStatement::NodeSelect::mJoins
protected

Definition at line 681 of file qgssqlstatement.h.

QList<NodeColumnSorted*> QgsSQLStatement::NodeSelect::mOrderBy
protected

Definition at line 683 of file qgssqlstatement.h.

QList<NodeTableDef*> QgsSQLStatement::NodeSelect::mTableList
protected

Definition at line 678 of file qgssqlstatement.h.

Node* QgsSQLStatement::NodeSelect::mWhere
protected

Definition at line 682 of file qgssqlstatement.h.


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