MCPcopy
hub / github.com/django/django / __and__

Method __and__

django/db/models/query.py:491–501  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

489 return cls
490
491 def __and__(self, other):
492 self._check_operator_queryset(other, "&")
493 self._merge_sanity_check(other)
494 if isinstance(other, EmptyQuerySet):
495 return other
496 if isinstance(self, EmptyQuerySet):
497 return self
498 combined = self._chain()
499 combined._merge_known_related_objects(other)
500 combined.query.combine(other.query, sql.AND)
501 return combined
502
503 def __or__(self, other):
504 self._check_operator_queryset(other, "|")

Callers

nothing calls this directly

Calls 5

_merge_sanity_checkMethod · 0.95
_chainMethod · 0.95
combineMethod · 0.80

Tested by

no test coverage detected