Class: QgsExpressionNodeLiteral

An expression node for literal values.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsExpressionNodeLiteral

Base classes

QgsExpressionNode

Abstract base class for all nodes that can appear in an expression.

Methods

value

The value of the literal.

valueAsString

Returns a string representation of the node's literal value.

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsExpressionNodeLiteral. See the FAQ for more details.

evalNode

prepareNode

class qgis.core.QgsExpressionNodeLiteral[source]

Bases: QgsExpressionNode

__init__(value: Any)

Constructor for QgsExpressionNodeLiteral, with the specified literal value.

Parameters:

value (Any)

__init__(a0: QgsExpressionNodeLiteral)
Parameters:

a0 (QgsExpressionNodeLiteral)

virtual evalNode(self, parent: QgsExpression | None, context: QgsExpressionContext | None) Any[source]
Parameters:
Return type:

Any

virtual prepareNode(self, parent: QgsExpression | None, context: QgsExpressionContext | None) bool[source]
Parameters:
Return type:

bool

value(self) Any[source]

The value of the literal.

Return type:

Any

valueAsString(self) str[source]

Returns a string representation of the node’s literal value.

Added in version 3.20.

Return type:

str