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
| Attribute | Type | Description |
|---|---|---|
| function | string = BOOL_OR | The 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
| Name | Type | Description |
|---|---|---|
| expression | string | The name of the field or an expression to aggregate. |
| **extra | dict | Additional keyword arguments for the aggregate expression. |
Signature
def BoolOr(
expression: string,
**extra: any
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| expression | string | The name of the boolean field or an expression to be aggregated. |
| **extra | any | Additional keyword arguments to be passed to the parent Aggregate class, such as filter or output_field. |