Skip to main content

BoolOr

This class represents the BOOL_OR aggregate function, which returns true if at least one value in a set of boolean expressions is true. It is specifically designed to work with boolean output fields in database queries.

Attributes

AttributeTypeDescription
functionstring = BOOL_ORThe SQL aggregate function name used for performing a logical OR operation across a set of values.
output_field[BooleanField](../../../../forms/fields/booleanfield.md?sid=django_forms_fields_booleanfield) = BooleanField()The database field type used to represent the result of the aggregate operation, ensuring the output is treated as a boolean.

Constructor

Signature

def BoolOr(
expression: string,
**extra: dict
)

Parameters

NameTypeDescription
expressionstringThe name of the field or an expression to aggregate.
**extradictAdditional keyword arguments for the aggregate expression.

Signature

def BoolOr(
expression: string,
**extra: any
) - > null

Parameters

NameTypeDescription
expressionstringThe name of the boolean field or an expression to be aggregated.
**extraanyAdditional keyword arguments to be passed to the parent Aggregate class, such as filter or output_field.