Skip to main content

StringAgg

This class provides a PostgreSQL-specific implementation for aggregating strings into a single value using a specified delimiter. It includes a deprecation warning advising users to migrate to the standard database-agnostic aggregate implementation. The class automatically handles string-to-Value conversion for delimiters to ensure compatibility with future framework versions.

Constructor

Signature

def StringAgg(
expression: Any,
delimiter: Any,
**extra: dict
)

Parameters

NameTypeDescription
expressionAnyThe field or expression to aggregate.
delimiterAnyThe separator to use between aggregated strings.
**extradictAdditional keyword arguments for the aggregate function.

Signature

def StringAgg(
expression: str | Expression,
delimiter: str | Value,
**extra: dict
) - > null

Parameters

NameTypeDescription
expression`strExpression`
delimiter`strValue`
**extradictAdditional keyword arguments for the underlying aggregate function configuration.