module documentation

Various data structures used in query construction. Factored out from django.db.models.query to avoid making the main module very large and/or so that they can be used by other modules without getting into circular import difficulties.

Class DeferredAttribute A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
Class FilteredRelation Specify custom filtering in the ON clause of SQL joins.
Class Q Encapsulate filters as objects that can then be combined logically (using `&` and `|`).
Class RegisterLookupMixin No class docstring; 0/2 method, 1/1 static method, 1/5 class method documented
Function check_rel_lookup_compatibility Check that self.model is compatible with target_opts. Compatibility is OK if: 1) model and opts match (where proxy inheritance is removed) 2) model is parent of opts' model or the other way around
Function refs_expression Check if the lookup_parts contains references to the given annotations set. Because the LOOKUP_SEP is contained in the default annotation names, check each prefix of the lookup_parts for a match.
Function select_related_descend Return True if this field should be used to descend deeper for select_related() purposes. Used by both the query construction code (compiler.get_related_selections()) and the model instance creation code (compiler...
Function subclasses Undocumented
Variable logger Undocumented
Variable PathInfo Undocumented
def check_rel_lookup_compatibility(model, target_opts, field): (source)

Check that self.model is compatible with target_opts. Compatibility is OK if: 1) model and opts match (where proxy inheritance is removed) 2) model is parent of opts' model or the other way around

def refs_expression(lookup_parts, annotations): (source)

Check if the lookup_parts contains references to the given annotations set. Because the LOOKUP_SEP is contained in the default annotation names, check each prefix of the lookup_parts for a match.

def select_related_descend(field, restricted, requested, load_fields, reverse=False): (source)

Return True if this field should be used to descend deeper for select_related() purposes. Used by both the query construction code (compiler.get_related_selections()) and the model instance creation code (compiler.klass_info). Arguments: * field - the field to be checked * restricted - a boolean field, indicating if the field list has been manually restricted using a requested clause) * requested - The select_related() dictionary. * load_fields - the set of fields to be loaded on this model * reverse - boolean, True if we are checking a reverse select related

def subclasses(cls): (source)

Undocumented

Undocumented

PathInfo = (source)

Undocumented