BoolAnd
This class represents a boolean AND aggregate function that evaluates whether all values in a set are true. It is typically used within database queries to perform logical reductions on boolean fields, returning a single boolean result.
Attributes
| Attribute | Type | Description |
|---|---|---|
| function | string = BOOL_AND | The SQL aggregate function name used for performing a logical AND 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 boolean aggregation. |
Constructor
Signature
def BoolAnd() - > null
Signature
def BoolAnd(
expression: string,
**extra: dict
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| expression | string | The name of the field or an expression representing the boolean values to be aggregated. |
| **extra | dict | Additional keyword arguments such as 'filter' for conditional aggregation or 'output_field' to override the default BooleanField. |