QgsSQLStatement::NodeColumnRef class

Reference to a column.

Base classes

class Node
Abstract node class.

Constructors, destructors, conversion operators

NodeColumnRef(const QString& name, bool star)
Constructor with column name only.
NodeColumnRef(const QString& tableName, const QString& name, bool star)
Constructor with table and column name.

Public functions

void accept(QgsSQLStatement::Visitor& v) const override
Support the visitor pattern.
auto clone() const -> QgsSQLStatement::Node* override
Generate a clone of this node.
auto cloneThis() const -> QgsSQLStatement::NodeColumnRef*
Clone with same type return.
auto distinct() const -> bool
Whether this is prefixed by DISTINCT.
auto dump() const -> QString override
Abstract virtual dump method.
auto name() const -> QString
The name of the column.
auto nodeType() const -> QgsSQLStatement::NodeType override
Abstract virtual that returns the type of this node.
void setDistinct(bool distinct = true)
Sets whether this is prefixed by DISTINCT.
auto star() const -> bool
Whether this is the * column.
auto tableName() const -> QString
The name of the table. May be empty.

Function documentation

void QgsSQLStatement::NodeColumnRef::accept(QgsSQLStatement::Visitor& v) const override

Support the visitor pattern.

Parameters
v A visitor that visits this node.

For any implementation this should look like

C++:

v.visit( *this );

Python:

v.visit( self)

QgsSQLStatement::Node* QgsSQLStatement::NodeColumnRef::clone() const override

Generate a clone of this node.

Returns a deep copy 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.

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

Abstract virtual dump method.

Returns A statement which represents this node as string

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

Abstract virtual that returns the type of this node.

Returns The type of this node