Class: QgsExpressionNodeLiteral

An expression node for literal values.

Class Hierarchy

Inheritance diagram of qgis.core.QgsExpressionNodeLiteral

Base classes

QgsExpressionNode

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

Methods

evalNode

prepareNode

value

The value of the literal.

valueAsString

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

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)

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

Any

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