MCPcopy
hub / github.com/django/django / get_extra_restriction

Method get_extra_restriction

django/db/models/fields/related.py:869–881  ·  view source on GitHub ↗

Return a pair condition used for joining and subquery pushdown. The condition is something that responds to as_sql(compiler, connection) method. Note that currently referring both the 'alias' and 'related_alias' will not work in some conditions, like subquer

(self, alias, related_alias)

Source from the content-addressed store, hash-verified

867 return {}
868
869 def get_extra_restriction(self, alias, related_alias):
870 """
871 Return a pair condition used for joining and subquery pushdown. The
872 condition is something that responds to as_sql(compiler, connection)
873 method.
874
875 Note that currently referring both the 'alias' and 'related_alias'
876 will not work in some conditions, like subquery pushdown.
877
878 A parallel method is get_extra_descriptor_filter() which is used in
879 instance.fieldname related object fetching.
880 """
881 return None
882
883 def get_path_info(self, filtered_relation=None):
884 """Get path from this field to the related model."""

Callers 2

as_sqlMethod · 0.45
trim_startMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected