MCPcopy
hub / github.com/django/django / add_related_update

Method add_related_update

django/db/models/sql/subqueries.py:122–128  ·  view source on GitHub ↗

Add (name, value) to an update query for an ancestor model. Update are coalesced so that only one update query per ancestor is run.

(self, model, field, value)

Source from the content-addressed store, hash-verified

120 self.values.append((field, model, val))
121
122 def add_related_update(self, model, field, value):
123 """
124 Add (name, value) to an update query for an ancestor model.
125
126 Update are coalesced so that only one update query per ancestor is run.
127 """
128 self.related_updates.setdefault(model, []).append((field, None, value))
129
130 def get_related_updates(self):
131 """

Callers 1

add_update_valuesMethod · 0.95

Calls 2

appendMethod · 0.45
setdefaultMethod · 0.45

Tested by

no test coverage detected