Class: QgsExpressionNodeIndexOperator

An indexing expression operator, which allows use of square brackets [] to reference map and array items.

Added in version 3.6.

Class Hierarchy

Inheritance diagram of qgis.core.QgsExpressionNodeIndexOperator

Base classes

QgsExpressionNode

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

Methods

container

Returns the container node, representing an array or map value.

index

Returns the index node, representing an array element index or map key.

Virtual Methods

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

evalNode

prepareNode

class qgis.core.QgsExpressionNodeIndexOperator[source]

Bases: QgsExpressionNode

__init__(container: QgsExpressionNode | None, index: QgsExpressionNode | None)

Constructor for QgsExpressionNodeIndexOperator.

Parameters:
container(self) QgsExpressionNode | None[source]

Returns the container node, representing an array or map value.

See also

index()

Return type:

Optional[QgsExpressionNode]

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

Any

index(self) QgsExpressionNode | None[source]

Returns the index node, representing an array element index or map key.

See also

container()

Return type:

Optional[QgsExpressionNode]

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

bool