Class: QgsExpressionNodeBinaryOperator¶
A binary expression operator, which operates on two values.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Abstract base class for all nodes that can appear in an expression. |
Enums
Methods
Returns |
|
Returns the binary operator. |
|
Returns the node to the left of the operator. |
|
Returns the node to the right of the operator. |
|
Returns the precedence index for the operator. |
|
Returns a the name of this operator without the operands. |
Virtual Methods
In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsExpressionNodeBinaryOperator. See the FAQ for more details.
- class qgis.core.QgsExpressionNodeBinaryOperator[source]¶
Bases:
QgsExpressionNode- __init__(op: QgsExpressionNodeBinaryOperator.BinaryOperator, opLeft: QgsExpressionNode | None, opRight: QgsExpressionNode | None)
Binary combination of the left and the right with op.
- Parameters:
opLeft (Optional[QgsExpressionNode])
opRight (Optional[QgsExpressionNode])
- class BinaryOperator(*values)¶
Bases:
IntEnum- boAnd = 1¶
- boConcat = 22¶
- boDiv = 18¶
- boEQ = 2¶
- boGE = 5¶
- boGT = 7¶
- boILike = 11¶
- boIntDiv = 19¶
- boIs = 13¶
- boIsNot = 14¶
- boLE = 4¶
- boLT = 6¶
- boLike = 9¶
- boMinus = 16¶
- boMod = 20¶
- boMul = 17¶
- boNE = 3¶
- boNotILike = 12¶
- boNotLike = 10¶
- boOr = 0¶
- boPlus = 15¶
- boPow = 21¶
- boRegexp = 8¶
- boAnd = 1¶
- boConcat = 22¶
- boDiv = 18¶
- boEQ = 2¶
- boGE = 5¶
- boGT = 7¶
- boILike = 11¶
- boIntDiv = 19¶
- boIs = 13¶
- boIsNot = 14¶
- boLE = 4¶
- boLT = 6¶
- boLike = 9¶
- boMinus = 16¶
- boMod = 20¶
- boMul = 17¶
- boNE = 3¶
- boNotILike = 12¶
- boNotLike = 10¶
- boOr = 0¶
- boPlus = 15¶
- boPow = 21¶
- boRegexp = 8¶
- virtual evalNode(self, parent: QgsExpression | None, context: QgsExpressionContext | None) Any[source]¶
- Parameters:
parent (Optional[QgsExpression])
context (Optional[QgsExpressionContext])
- Return type:
- leftAssociative(self) bool[source]¶
Returns
Trueif the operator is left-associative.- Return type:
bool
- op(self) QgsExpressionNodeBinaryOperator.BinaryOperator[source]¶
Returns the binary operator.
- Return type:
- opLeft(self) QgsExpressionNode | None[source]¶
Returns the node to the left of the operator.
See also
- Return type:
- opRight(self) QgsExpressionNode | None[source]¶
Returns the node to the right of the operator.
See also
- Return type:
- precedence(self) int[source]¶
Returns the precedence index for the operator. Higher values have higher precedence.
- Return type:
int
- virtual prepareNode(self, parent: QgsExpression | None, context: QgsExpressionContext | None) bool[source]¶
- Parameters:
parent (Optional[QgsExpression])
context (Optional[QgsExpressionContext])
- Return type:
bool