QGIS API Documentation  3.2.0-Bonn (bc43194)
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
 

Protected Attributes

bool mDistinct
 
QString mName
 
bool mStar
 
QString mTableName
 

Detailed Description

Reference to a column.

Definition at line 505 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 509 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 511 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 531 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 498 of file qgssqlstatement.cpp.

◆ cloneThis()

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

Clone with same type return.

Definition at line 503 of file qgssqlstatement.cpp.

◆ distinct()

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

Whether this is prefixed by DISTINCT.

Definition at line 526 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 484 of file qgssqlstatement.cpp.

◆ name()

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

The name of the column.

Definition at line 520 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 528 of file qgssqlstatement.h.

◆ setDistinct()

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

Sets whether this is prefixed by DISTINCT.

Definition at line 514 of file qgssqlstatement.h.

◆ star()

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

Whether this is the * column.

Definition at line 523 of file qgssqlstatement.h.

◆ tableName()

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

The name of the table. May be empty.

Definition at line 517 of file qgssqlstatement.h.

Member Data Documentation

◆ mDistinct

bool QgsSQLStatement::NodeColumnRef::mDistinct
protected

Definition at line 539 of file qgssqlstatement.h.

◆ mName

QString QgsSQLStatement::NodeColumnRef::mName
protected

Definition at line 538 of file qgssqlstatement.h.

◆ mStar

bool QgsSQLStatement::NodeColumnRef::mStar
protected

Definition at line 540 of file qgssqlstatement.h.

◆ mTableName

QString QgsSQLStatement::NodeColumnRef::mTableName
protected

Definition at line 537 of file qgssqlstatement.h.


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