Class: QgsEsriArcadeBinaryOperatorExpression

Represents a binary operation expression.

Added in version 4.4.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsEsriArcadeBinaryOperatorExpression

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__

Enums

BinaryOperator

Binary operator enumeration.

Abstract Methods

clone

Methods

binaryOperator

Returns the binary operator.

leftAssociative

Returns True if operator is left-associative.

leftOperand

Returns the left-hand operand expression.

precedence

Returns operator precedence value.

rightOperand

Returns the right-hand operand expression.

text

Returns text representation of the operator.

class qgis.core.QgsEsriArcadeBinaryOperatorExpression[source]

Bases: QgsEsriArcadeExpression

__init__(binaryOperator: QgsEsriArcadeBinaryOperatorExpression.BinaryOperator, leftOperand: QgsEsriArcadeExpression | None, rightOperand: QgsEsriArcadeExpression | None)

Constructor for QgsEsriArcadeBinaryOperatorExpression.

Ownership of leftOperand and rightOperand is transferred to this expression.

Parameters:
class BinaryOperator(*values)

Bases: Enum

Binary operator enumeration.

  • Plus: Addition +

  • Minus: Subtraction -

  • Multiply: Multiplication *

  • Divide: Division /

  • Modulo: Modulo %

  • Equal: Equality test ==

  • NotEqual: Not equal test !=

  • LessThan: Less than <

  • GreaterThan: Greater than >

  • LessThanOrEqual: Less than or equal to <=

  • GreaterThanOrEqual: Greater than or equal to >=

  • LogicalAnd: Logical and &&

  • LogicalOr: Logical or ||

  • BitwiseAnd: Bitwise and, eg “7 & 14”

  • BitwiseOr: Bitwise or, eg “7 | 14”

  • BitwiseXor: Bitwise xor, eg “7 ^ 14”

  • BitwiseLeftShift: Bitwise left shift, eg “7 << 14”

  • BitwiseSignedRightShift: Bitwise right shift, eg “7 >> 14”

  • BitwiseUnsignedRightShift: Bitwise unsigned right shift, eg “7 >>> 14”

BitwiseAnd = 13
BitwiseLeftShift = 16
BitwiseOr = 14
BitwiseSignedRightShift = 17
BitwiseUnsignedRightShift = 18
BitwiseXor = 15
Divide = 3
Equal = 5
GreaterThan = 8
GreaterThanOrEqual = 10
LessThan = 7
LessThanOrEqual = 9
LogicalAnd = 11
LogicalOr = 12
Minus = 1
Modulo = 4
Multiply = 2
NotEqual = 6
Plus = 0
binaryOperator(self) → QgsEsriArcadeBinaryOperatorExpression.BinaryOperator[source]

Returns the binary operator.

Return type:

QgsEsriArcadeBinaryOperatorExpression.BinaryOperator

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

QgsEsriArcadeNode|None

leftAssociative(self) → bool[source]

Returns True if operator is left-associative.

Return type:

bool

leftOperand(self) → QgsEsriArcadeExpression | None[source]

Returns the left-hand operand expression.

Return type:

QgsEsriArcadeExpression|None

precedence(self) → int[source]

Returns operator precedence value.

Return type:

int

rightOperand(self) → QgsEsriArcadeExpression | None[source]

Returns the right-hand operand expression.

Return type:

QgsEsriArcadeExpression|None

text(self) → str[source]

Returns text representation of the operator.

Return type:

str