DataContains
This class provides a PostgreSQL-specific lookup for checking if one data structure contains another using the "@ >" operator. It extends the standard lookup functionality to support containment queries within database operations.
Attributes
| Attribute | Type | Description |
|---|---|---|
| lookup_name | string = "contains" | The identifier used in Django querysets to invoke the containment lookup. |
| postgres_operator | string = "@ >" | The specific PostgreSQL operator used in the generated SQL to check if one data structure contains another. |
Constructor
Signature
def DataContains()
Methods
lookup_name()
def lookup_name() - > string
The identifier used in Django query filters to trigger this specific lookup.
Returns
| Type | Description |
|---|---|
string | The string 'contains' used in ORM queries. |
postgres_operator()
def postgres_operator() - > string
The specific PostgreSQL operator used to perform the containment check in the database.
Returns
| Type | Description |
|---|---|
string | The '@ >' operator string used for JSONB or Array containment. |