HasAnyKeys
This class provides a lookup mechanism to check if a collection or JSON field contains any of the specified keys. It maps to the PostgreSQL '?|' operator, enabling efficient filtering based on the presence of at least one key from a given list.
Attributes
| Attribute | Type | Description |
|---|---|---|
| lookup_name | string = has_any_keys | The identifier used in query expressions to perform a search for any of the specified keys. |
| postgres_operator | string = ? |
Constructor
Signature
def HasAnyKeys()
Methods
lookup_name()
def lookup_name() - > string
The identifier used in Django query expressions to apply the 'has_any_keys' filter.
Returns
| Type | Description |
|---|---|
string | The string 'has_any_keys' used for lookup registration. |
postgres_operator()
def postgres_operator() - > string
The PostgreSQL operator used to check if any of the specified keys exist in a JSONB field.
Returns
| Type | Description |
|---|---|
string | The PostgreSQL '?|' operator string. |