Class: QgsScopedExpressionFunction

class qgis.core.QgsScopedExpressionFunction(fnname: str, params: int, group: str, helpText: str = '', usesGeometry: bool = False, referencedColumns: Iterable[str] = set(), lazyEval: bool = False, handlesNull: bool = False, isContextual: bool = True)

Bases: QgsExpressionFunction

Create a new QgsScopedExpressionFunction

New in version 2.12.

QgsScopedExpressionFunction(fnname: str, params: object, group: str, helpText: str = ‘’, usesGeometry: bool = False, referencedColumns: Iterable[str] = set(), lazyEval: bool = False, handlesNull: bool = False, isContextual: bool = True) Create a new QgsScopedExpressionFunction using named parameters.

New in version 3.0.

QgsScopedExpressionFunction(QgsScopedExpressionFunction)

Expression function for use within a QgsExpressionContextScope. This differs from a standard QgsExpression.Function in that it requires an implemented clone() method.

New in version 2.12.

Parameters
  • fnname (str) –

  • params (int) –

  • group (str) –

  • helpText (str = '') –

  • usesGeometry (bool = False) –

  • referencedColumns (Iterable[str] = set()) –

  • lazyEval (bool = False) –

  • handlesNull (bool = False) –

  • isContextual

allParamsStatic()
clone(self) → QgsScopedExpressionFunction

Returns a clone of the function.

Return type

QgsScopedExpressionFunction

func(self, values: List[Any], context: QgsExpressionContext, parent: QgsExpression, node: QgsExpressionNodeFunction) → Any
Parameters
Return type

Any

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

bool

referencedColumns(self, node: QgsExpressionNodeFunction) → Set[str]
Parameters

node (QgsExpressionNodeFunction) –

Return type

Set[str]

usesGeometry(self, node: QgsExpressionNodeFunction) → bool
Parameters

node (QgsExpressionNodeFunction) –

Return type

bool