MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / process_saves

Method process_saves

lib/sqlalchemy/orm/dependency.py:811–827  ·  view source on GitHub ↗
(self, uowcommit, states)

Source from the content-addressed store, hash-verified

809 )
810
811 def process_saves(self, uowcommit, states):
812 for state in states:
813 history = uowcommit.get_attribute_history(
814 state, self.key, attributes.PASSIVE_NO_INITIALIZE
815 )
816 if history:
817 if history.added:
818 for child in history.added:
819 self._synchronize(
820 state, child, None, False, uowcommit, "add"
821 )
822 elif history.deleted:
823 self._synchronize(
824 state, None, None, True, uowcommit, "delete"
825 )
826 if self.post_update:
827 self._post_update(state, uowcommit, history.sum())
828
829 def _synchronize(
830 self,

Callers

nothing calls this directly

Calls 4

_synchronizeMethod · 0.95
get_attribute_historyMethod · 0.80
_post_updateMethod · 0.80
sumMethod · 0.45

Tested by

no test coverage detected