Class: QgsEsriArcadeVariableDeclarationStatement

Represents a variable declaration statement.

For example var x = 3;.

Added in version 4.4.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsEsriArcadeVariableDeclarationStatement

Base classes

QgsEsriArcadeStatement

Base class for statement nodes in an Esri Arcade script.

QgsEsriArcadeNode

Represents an abstract node for an Esri Arcade script.

Constructor

__init__

Abstract Methods

clone

Methods

initializer

Returns the optional initializer expression, or None if uninitialized.

variableName

Returns the declared variable name.

class qgis.core.QgsEsriArcadeVariableDeclarationStatement[source]

Bases: QgsEsriArcadeStatement

__init__(variableName: str | None, initializer: QgsEsriArcadeExpression | None = None)

Constructor for QgsEsriArcadeVariableDeclarationStatement.

Ownership of initializer is transferred to this statement.

Parameters:
abstract clone(self) → QgsEsriArcadeNode | None[source]
Return type:

QgsEsriArcadeNode|None

initializer(self) → QgsEsriArcadeExpression | None[source]

Returns the optional initializer expression, or None if uninitialized.

For the statement var my_var = 3 * 2; this would return the 3 * 2 expression node.

Return type:

QgsEsriArcadeExpression|None

variableName(self) → str[source]

Returns the declared variable name.

For the statement var my_var = 3; this would return “my_var”.

Return type:

str