Class: QgsExpressionNodeBinaryOperator¶
- class qgis.core.QgsExpressionNodeBinaryOperator¶
Bases:
QgsExpressionNode
A binary expression operator, which operates on two values.
QgsExpressionNodeBinaryOperator(op: QgsExpressionNodeBinaryOperator.BinaryOperator, opLeft:
QgsExpressionNode
, opRight:QgsExpressionNode
) Binary combination of the left and the right with op.QgsExpressionNodeBinaryOperator(
QgsExpressionNodeBinaryOperator
)Methods
- rtype:
QgsExpressionNode
- rtype:
str
- param parent:
- param parent:
Returns
True
if the operator is left-associative.- rtype:
bool
- rtype:
QgsExpressionNode.NodeType
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.
- param parent:
- rtype:
Set[str]
- rtype:
Set[str]
- rtype:
Set[str]
Returns a the name of this operator without the operands.
Attributes
- class BinaryOperator¶
Bases:
int
- 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¶
- clone(self) QgsExpressionNode ¶
- Return type:
- dump(self) str ¶
- Return type:
str
- evalNode(self, parent: QgsExpression, context: QgsExpressionContext) Any ¶
- Parameters:
parent (QgsExpression) –
context (QgsExpressionContext) –
- Return type:
Any
- isStatic(self, parent: QgsExpression, context: QgsExpressionContext) bool ¶
- Parameters:
parent (QgsExpression) –
context (QgsExpressionContext) –
- Return type:
bool
- leftAssociative(self) bool ¶
Returns
True
if the operator is left-associative.- Return type:
bool
- needsGeometry(self) bool ¶
- Return type:
bool
- nodeType(self) QgsExpressionNode.NodeType ¶
- Return type:
- op(self) QgsExpressionNodeBinaryOperator.BinaryOperator ¶
Returns the binary operator.
- Return type:
- opLeft(self) QgsExpressionNode ¶
Returns the node to the left of the operator.
See also
- Return type:
- opRight(self) QgsExpressionNode ¶
Returns the node to the right of the operator.
See also
- Return type:
- precedence(self) int ¶
Returns the precedence index for the operator. Higher values have higher precedence.
- Return type:
int
- prepareNode(self, parent: QgsExpression, context: QgsExpressionContext) bool ¶
- Parameters:
parent (QgsExpression) –
context (QgsExpressionContext) –
- Return type:
bool
- referencedColumns(self) Set[str] ¶
- Return type:
Set[str]
- referencedFunctions(self) Set[str] ¶
- Return type:
Set[str]
- referencedVariables(self) Set[str] ¶
- Return type:
Set[str]
- text(self) str ¶
Returns a the name of this operator without the operands. I.e. “AND”, “OR”, …
- Return type:
str