Class: QgsEsriArcadeMemberAccessExpression

Represents a member access expression using dot or bracket notation.

For example $feature.ATTRIBUTE. or my_dict["ATTRIBUTE"] for accessing members of a dictionary.

Arcade also supports a “?.” accessor which performs a “safe access”, where null values are returned when the container itself is null. For these “?.” forms isSafeAccess() will return True.

Added in version 4.4.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsEsriArcadeMemberAccessExpression

Base classes

QgsEsriArcadeExpression

Base class for expression nodes in an Esri Arcade script.

QgsEsriArcadeNode

Represents an abstract node for an Esri Arcade script.

Constructor

__init__

Abstract Methods

clone

Methods

containerExpression

Returns the container expression being accessed.

isSafeAccess

Returns True if member access uses the safe access operator "?.".

memberName

Returns the member attribute name.

setIsSafeAccess

Sets whether member access uses the safe access operator "?.".

class qgis.core.QgsEsriArcadeMemberAccessExpression[source]

Bases: QgsEsriArcadeExpression

__init__(containerExpression: QgsEsriArcadeExpression | None, memberName: str | None, isSafeAccess: bool = False)

Constructor for QgsEsriArcadeMemberAccessExpression.

Ownership of containerExpression is transferred to this expression.

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

QgsEsriArcadeNode|None

containerExpression(self) → QgsEsriArcadeExpression | None[source]

Returns the container expression being accessed.

Return type:

QgsEsriArcadeExpression|None

isSafeAccess(self) → bool[source]

Returns True if member access uses the safe access operator “?.”.

Return type:

bool

memberName(self) → str[source]

Returns the member attribute name.

Return type:

str

setIsSafeAccess(self, isSafeAccess: bool)[source]

Sets whether member access uses the safe access operator “?.”.

Parameters:

isSafeAccess (bool)