QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
QgsSQLStatement::NodeSelect Class Reference

SELECT node. More...

#include <qgssqlstatement.h>

Inheritance diagram for QgsSQLStatement::NodeSelect:

Public Member Functions

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

Protected Attributes

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

Detailed Description

SELECT node.

Definition at line 809 of file qgssqlstatement.h.

Constructor & Destructor Documentation

◆ NodeSelect()

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

Constructor.

Definition at line 813 of file qgssqlstatement.h.

◆ ~NodeSelect()

QgsSQLStatement::NodeSelect::~NodeSelect ( )
override

Definition at line 591 of file qgssqlstatement.cpp.

Member Function Documentation

◆ accept()

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

Support the visitor pattern.

For any implementation this should look like

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

Implements QgsSQLStatement::Node.

Definition at line 841 of file qgssqlstatement.h.

◆ appendJoin()

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

Append a join.

Definition at line 819 of file qgssqlstatement.h.

◆ clone()

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 650 of file qgssqlstatement.cpp.

◆ columns()

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

Returns the list of columns.

Definition at line 828 of file qgssqlstatement.h.

◆ distinct()

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

Returns if the SELECT is DISTINCT.

Definition at line 830 of file qgssqlstatement.h.

◆ dump()

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 599 of file qgssqlstatement.cpp.

◆ joins()

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

Returns the list of joins.

Definition at line 832 of file qgssqlstatement.h.

◆ nodeType()

QgsSQLStatement::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 838 of file qgssqlstatement.h.

◆ orderBy()

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

Returns the list of order by columns.

Definition at line 836 of file qgssqlstatement.h.

◆ setJoins()

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

Sets joins.

Definition at line 817 of file qgssqlstatement.h.

◆ setOrderBy()

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

Sets order by columns.

Definition at line 823 of file qgssqlstatement.h.

◆ setWhere()

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

Sets where clause.

Definition at line 821 of file qgssqlstatement.h.

◆ tables()

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

Returns the list of tables.

Definition at line 826 of file qgssqlstatement.h.

◆ where()

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

Returns the where clause.

Definition at line 834 of file qgssqlstatement.h.

Member Data Documentation

◆ mColumns

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

Definition at line 855 of file qgssqlstatement.h.

◆ mDistinct

bool QgsSQLStatement::NodeSelect::mDistinct
protected

Definition at line 856 of file qgssqlstatement.h.

◆ mJoins

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

Definition at line 857 of file qgssqlstatement.h.

◆ mOrderBy

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

Definition at line 859 of file qgssqlstatement.h.

◆ mTableList

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

Definition at line 854 of file qgssqlstatement.h.

◆ mWhere

std::unique_ptr<Node> QgsSQLStatement::NodeSelect::mWhere
protected

Definition at line 858 of file qgssqlstatement.h.


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