Skip to main content

ContainedBy

This class provides the 'contained_by' lookup functionality for PostgreSQL database operations. It maps the lookup to the PostgreSQL '< @' operator to determine if one range or set is contained within another.

Attributes

AttributeTypeDescription
lookup_namestring = contained_byThe identifier used in Django ORM queries to apply the contained-by lookup.
postgres_operatorstring = < @The specific PostgreSQL operator used in the generated SQL to check if one range or collection is contained by another.

Constructor

Signature

def ContainedBy()

Methods


lookup_name()

def lookup_name() - > string

The identifier used in Django ORM queries to apply the contained_by operator.

Returns

TypeDescription
stringThe string 'contained_by' used for query filtering.

postgres_operator()

def postgres_operator() - > string

The specific PostgreSQL operator symbol used in the generated SQL.

Returns

TypeDescription
stringThe '< @' operator used to check if the left-hand operand is contained by the right-hand operand.