QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
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

Public Member Functions

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

Protected Attributes

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

Detailed Description

SELECT node.

Definition at line 739 of file qgssqlstatement.h.

Constructor & Destructor Documentation

◆ NodeSelect()

QgsSQLStatement::NodeSelect::NodeSelect ( const QList< QgsSQLStatement::NodeTableDef * > &  tableList,
const QList< QgsSQLStatement::NodeSelectedColumn * > &  columns,
bool  distinct 


Definition at line 743 of file qgssqlstatement.h.

◆ ~NodeSelect()

QgsSQLStatement::NodeSelect::~NodeSelect ( )

Definition at line 590 of file qgssqlstatement.cpp.

Member Function Documentation

◆ accept()

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

Support the visitor pattern.

For any implementation this should look like


v.visit( *this );


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

Implements QgsSQLStatement::Node.

Definition at line 771 of file qgssqlstatement.h.

◆ appendJoin()

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

Append a join.

Definition at line 749 of file qgssqlstatement.h.

◆ clone()

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

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.

a deep copy of this node.

Implements QgsSQLStatement::Node.

Definition at line 650 of file qgssqlstatement.cpp.

◆ columns()

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

Returns the list of columns.

Definition at line 758 of file qgssqlstatement.h.

◆ distinct()

bool QgsSQLStatement::NodeSelect::distinct ( ) const

Returns if the SELECT is DISTINCT.

Definition at line 760 of file qgssqlstatement.h.

◆ dump()

QString QgsSQLStatement::NodeSelect::dump ( ) const

Abstract virtual dump method.

A statement which represents this node as string

Implements QgsSQLStatement::Node.

Definition at line 599 of file qgssqlstatement.cpp.

◆ joins()

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

Returns the list of joins.

Definition at line 762 of file qgssqlstatement.h.

◆ nodeType()

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

Abstract virtual that returns the type of this node.

The type of this node

Implements QgsSQLStatement::Node.

Definition at line 768 of file qgssqlstatement.h.

◆ orderBy()

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

Returns the list of order by columns.

Definition at line 766 of file qgssqlstatement.h.

◆ setJoins()

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

Sets joins.

Definition at line 747 of file qgssqlstatement.h.

◆ setOrderBy()

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

Sets order by columns.

Definition at line 753 of file qgssqlstatement.h.

◆ setWhere()

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

Sets where clause.

Definition at line 751 of file qgssqlstatement.h.

◆ tables()

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

Returns the list of tables.

Definition at line 756 of file qgssqlstatement.h.

◆ where()

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

Returns the where clause.

Definition at line 764 of file qgssqlstatement.h.

Member Data Documentation

◆ mColumns

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

Definition at line 776 of file qgssqlstatement.h.

◆ mDistinct

bool QgsSQLStatement::NodeSelect::mDistinct

Definition at line 777 of file qgssqlstatement.h.

◆ mJoins

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

Definition at line 778 of file qgssqlstatement.h.

◆ mOrderBy

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

Definition at line 780 of file qgssqlstatement.h.

◆ mTableList

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

Definition at line 775 of file qgssqlstatement.h.

◆ mWhere

Node* QgsSQLStatement::NodeSelect::mWhere = nullptr

Definition at line 779 of file qgssqlstatement.h.

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