QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | Protected Attributes | List of all members
QgsSQLStatement::NodeColumnRef Class Reference

Reference to a column. More...

#include <qgssqlstatement.h>

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

Public Member Functions

 NodeColumnRef (const QString &name, bool star)
 Constructor with column name only. More...
 
 NodeColumnRef (const QString &tableName, const QString &name, bool star)
 Constructor with table and column name. More...
 
void accept (QgsSQLStatement::Visitor &v) const override
 Support the visitor pattern. More...
 
QgsSQLStatement::Nodeclone () const override
 Generate a clone of this node. More...
 
QgsSQLStatement::NodeColumnRefcloneThis () const
 Clone with same type return. More...
 
bool distinct () const
 Whether this is prefixed by DISTINCT. More...
 
QString dump () const override
 Abstract virtual dump method. More...
 
QString name () const
 The name of the column. More...
 
QgsSQLStatement::NodeType nodeType () const override
 Abstract virtual that returns the type of this node. More...
 
void setDistinct (bool distinct=true)
 Sets whether this is prefixed by DISTINCT. More...
 
bool star () const
 Whether this is the * column. More...
 
QString tableName () const
 The name of the table. May be empty. 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

bool mDistinct
 
QString mName
 
bool mStar
 
QString mTableName
 

Detailed Description

Reference to a column.

Definition at line 520 of file qgssqlstatement.h.

Constructor & Destructor Documentation

◆ NodeColumnRef() [1/2]

QgsSQLStatement::NodeColumnRef::NodeColumnRef ( const QString &  name,
bool  star 
)
inline

Constructor with column name only.

Definition at line 524 of file qgssqlstatement.h.

◆ NodeColumnRef() [2/2]

QgsSQLStatement::NodeColumnRef::NodeColumnRef ( const QString &  tableName,
const QString &  name,
bool  star 
)
inline

Constructor with table and column name.

Definition at line 526 of file qgssqlstatement.h.

Member Function Documentation

◆ accept()

void QgsSQLStatement::NodeColumnRef::accept ( QgsSQLStatement::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 546 of file qgssqlstatement.h.

◆ clone()

QgsSQLStatement::Node * QgsSQLStatement::NodeColumnRef::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 526 of file qgssqlstatement.cpp.

◆ cloneThis()

QgsSQLStatement::NodeColumnRef * QgsSQLStatement::NodeColumnRef::cloneThis ( ) const

Clone with same type return.

Definition at line 531 of file qgssqlstatement.cpp.

◆ distinct()

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

Whether this is prefixed by DISTINCT.

Definition at line 541 of file qgssqlstatement.h.

◆ dump()

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

Abstract virtual dump method.

Returns
A statement which represents this node as string

Implements QgsSQLStatement::Node.

Definition at line 512 of file qgssqlstatement.cpp.

◆ name()

QString QgsSQLStatement::NodeColumnRef::name ( ) const
inline

The name of the column.

Definition at line 535 of file qgssqlstatement.h.

◆ nodeType()

QgsSQLStatement::NodeType QgsSQLStatement::NodeColumnRef::nodeType ( ) const
inlineoverridevirtual

Abstract virtual that returns the type of this node.

Returns
The type of this node

Implements QgsSQLStatement::Node.

Definition at line 543 of file qgssqlstatement.h.

◆ setDistinct()

void QgsSQLStatement::NodeColumnRef::setDistinct ( bool  distinct = true)
inline

Sets whether this is prefixed by DISTINCT.

Definition at line 529 of file qgssqlstatement.h.

◆ star()

bool QgsSQLStatement::NodeColumnRef::star ( ) const
inline

Whether this is the * column.

Definition at line 538 of file qgssqlstatement.h.

◆ tableName()

QString QgsSQLStatement::NodeColumnRef::tableName ( ) const
inline

The name of the table. May be empty.

Definition at line 532 of file qgssqlstatement.h.

Member Data Documentation

◆ mDistinct

bool QgsSQLStatement::NodeColumnRef::mDistinct
protected

Definition at line 554 of file qgssqlstatement.h.

◆ mName

QString QgsSQLStatement::NodeColumnRef::mName
protected

Definition at line 553 of file qgssqlstatement.h.

◆ mStar

bool QgsSQLStatement::NodeColumnRef::mStar
protected

Definition at line 555 of file qgssqlstatement.h.

◆ mTableName

QString QgsSQLStatement::NodeColumnRef::mTableName
protected

Definition at line 552 of file qgssqlstatement.h.


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