Class: QgsExpressionNodeUnaryOperator

class qgis.core.QgsExpressionNodeUnaryOperator(op: QgsExpressionNodeUnaryOperator.UnaryOperator, operand: QgsExpressionNode)

Bases: QgsExpressionNode

A node unary operator is modifying the value of operand by negating it with op.

QgsExpressionNodeUnaryOperator(QgsExpressionNodeUnaryOperator)

A unary node is either negative as in boolean (not) or as in numbers (minus).

Methods

clone

rtype

QgsExpressionNode

dump

rtype

str

evalNode

param parent

isStatic

param parent

nodeType

rtype

QgsExpressionNode.NodeType

op

Returns the unary operator.

operand

Returns the node the operator will operate upon.

prepareNode

param parent

referencedColumns

rtype

Set[str]

referencedFunctions

rtype

Set[str]

referencedVariables

rtype

Set[str]

text

Returns a the name of this operator without the operands.

Attributes

uoMinus

uoNot

class UnaryOperator

Bases: int

clone(self) QgsExpressionNode
Return type

QgsExpressionNode

dump(self) str
Return type

str

evalNode(self, parent: QgsExpression, context: QgsExpressionContext) Any
Parameters
Return type

Any

isStatic(self, parent: QgsExpression, context: QgsExpressionContext) bool
Parameters
Return type

bool

nodeType(self) QgsExpressionNode.NodeType
Return type

QgsExpressionNode.NodeType

op(self) QgsExpressionNodeUnaryOperator.UnaryOperator

Returns the unary operator.

Return type

QgsExpressionNodeUnaryOperator.UnaryOperator

operand(self) QgsExpressionNode

Returns the node the operator will operate upon.

Return type

QgsExpressionNode

prepareNode(self, parent: QgsExpression, context: QgsExpressionContext) bool
Parameters
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. “NOT” or “-”

Return type

str

uoMinus = 1
uoNot = 0