Class: QgsEsriArcadeForInStatement

Represents a range based for…in or for…of iteration statement.

Added in version 4.4.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsEsriArcadeForInStatement

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__

Enums

IterationType

Type of iteration loop.

Abstract Methods

clone

Methods

body

Returns the loop body block statement.

collection

Returns the collection expression being iterated over.

isVariableDeclaration

Returns True if the loop variable was declared with the var keyword.

iterationType

Returns the iteration type (for...in or for...of).

variableName

Returns the loop variable identifier name.

class qgis.core.QgsEsriArcadeForInStatement[source]

Bases: QgsEsriArcadeStatement

__init__(iterationType: QgsEsriArcadeForInStatement.IterationType, variableName: str | None, isVariableDeclaration: bool, collection: QgsEsriArcadeExpression | None, body: QgsEsriArcadeBlockStatement | None)

Constructor for QgsEsriArcadeForInStatement.

Ownership of collection and body is transferred to this statement.

Parameters:
class IterationType(*values)

Bases: Enum

Type of iteration loop.

  • ForIn: For x in y loop

  • ForOf: For x of y loop

ForIn = 0
ForOf = 1
body(self) → QgsEsriArcadeBlockStatement | None[source]

Returns the loop body block statement.

Return type:

QgsEsriArcadeBlockStatement|None

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

QgsEsriArcadeNode|None

collection(self) → QgsEsriArcadeExpression | None[source]

Returns the collection expression being iterated over.

Return type:

QgsEsriArcadeExpression|None

isVariableDeclaration(self) → bool[source]

Returns True if the loop variable was declared with the var keyword.

Return type:

bool

iterationType(self) → QgsEsriArcadeForInStatement.IterationType[source]

Returns the iteration type (for…in or for…of).

Return type:

QgsEsriArcadeForInStatement.IterationType

variableName(self) → str[source]

Returns the loop variable identifier name.

Return type:

str