MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / process_saves

Method process_saves

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

Source from the content-addressed store, hash-verified

805 )
806
807 def process_saves(self, uowcommit, states):
808 for state in states:
809 history = uowcommit.get_attribute_history(
810 state, self.key, attributes.PASSIVE_NO_INITIALIZE
811 )
812 if history:
813 if history.added:
814 for child in history.added:
815 self._synchronize(
816 state, child, None, False, uowcommit, "add"
817 )
818 elif history.deleted:
819 self._synchronize(
820 state, None, None, True, uowcommit, "delete"
821 )
822 if self.post_update:
823 self._post_update(state, uowcommit, history.sum())
824
825 def _synchronize(
826 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