MCPcopy
hub / github.com/django/django / reset_refcounts

Method reset_refcounts

django/db/models/sql/query.py:991–998  ·  view source on GitHub ↗

Reset reference counts for aliases so that they match the value passed in `to_counts`.

(self, to_counts)

Source from the content-addressed store, hash-verified

989 aliases.append(parent_alias)
990
991 def reset_refcounts(self, to_counts):
992 """
993 Reset reference counts for aliases so that they match the value passed
994 in `to_counts`.
995 """
996 for alias, cur_refcount in self.alias_refcount.copy().items():
997 unref_amount = cur_refcount - to_counts.get(alias, 0)
998 self.unref_alias(alias, unref_amount)
999
1000 def change_aliases(self, change_map):
1001 """

Callers 2

as_sqlMethod · 0.80
pre_sql_setupMethod · 0.80

Calls 4

unref_aliasMethod · 0.95
itemsMethod · 0.45
copyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected