QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
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 colum name only. More...
 
 NodeColumnRef (const QString &tableName, const QString &name, bool star)
 Constructor with table and column name. More...
 
virtual void accept (Visitor &v) const override
 Support the visitor pattern. More...
 
virtual Nodeclone () const override
 Generate a clone of this node. More...
 
NodeColumnRefcloneThis () const
 Clone with same type return. More...
 
bool distinct () const
 Whether this is prefixed by DISTINCT. More...
 
virtual QString dump () const override
 Abstract virtual dump method. More...
 
QString name () const
 The name of the column. More...
 
virtual NodeType nodeType () const override
 Abstract virtual that returns the type of this node. More...
 
void setDistinct (bool distinct=true)
 Set whether this is prefixed by DISTINCT. More...
 
bool star () const
 Whether this is the * column. More...
 
QString tableName () const
 The name of the table. More...
 
- Public Member Functions inherited from QgsSQLStatement::Node
virtual ~Node ()
 

Protected Attributes

bool mDistinct
 
QString mName
 
bool mStar
 
QString mTableName
 

Detailed Description

Reference to a column.

Definition at line 450 of file qgssqlstatement.h.

Constructor & Destructor Documentation

◆ NodeColumnRef() [1/2]

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

Constructor with colum name only.

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

Member Function Documentation

◆ accept()

virtual void QgsSQLStatement::NodeColumnRef::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 476 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 486 of file qgssqlstatement.cpp.

◆ cloneThis()

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

Clone with same type return.

Definition at line 491 of file qgssqlstatement.cpp.

◆ distinct()

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

Whether this is prefixed by DISTINCT.

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

◆ name()

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

The name of the column.

Definition at line 465 of file qgssqlstatement.h.

◆ nodeType()

virtual 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 473 of file qgssqlstatement.h.

◆ setDistinct()

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

Set whether this is prefixed by DISTINCT.

Definition at line 459 of file qgssqlstatement.h.

◆ star()

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

Whether this is the * column.

Definition at line 468 of file qgssqlstatement.h.

◆ tableName()

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

The name of the table.

May be empty.

Definition at line 462 of file qgssqlstatement.h.

Member Data Documentation

◆ mDistinct

bool QgsSQLStatement::NodeColumnRef::mDistinct
protected

Definition at line 484 of file qgssqlstatement.h.

◆ mName

QString QgsSQLStatement::NodeColumnRef::mName
protected

Definition at line 483 of file qgssqlstatement.h.

◆ mStar

bool QgsSQLStatement::NodeColumnRef::mStar
protected

Definition at line 485 of file qgssqlstatement.h.

◆ mTableName

QString QgsSQLStatement::NodeColumnRef::mTableName
protected

Definition at line 482 of file qgssqlstatement.h.


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