class documentation

class DetectKeySwitch(DependencyProcessor):

View In Hierarchy

For many-to-one relationships with no one-to-many backref, searches for parents through the unit of work when a primary key has changed and updates them.

Theoretically, this approach could be expanded to support transparent deletion of objects referenced via many-to-one as well, although the current attribute system doesn't do enough bookkeeping for this to be efficient.

Method ​_key​_switchers Undocumented
Method ​_pks​_changed Undocumented
Method ​_process​_key​_switches Undocumented
Method per​_property​_flush​_actions Undocumented
Method per​_property​_preprocessors establish actions and dependencies related to a flush.
Method per​_state​_flush​_actions establish actions and dependencies related to a flush.
Method presort​_deletes Undocumented
Method presort​_saves Undocumented
Method process​_deletes Undocumented
Method process​_saves Undocumented
Method prop​_has​_changes Undocumented

Inherited from DependencyProcessor:

Class Method from​_relationship Undocumented
Method __init__ Undocumented
Method __repr__ Undocumented
Method ​_get​_reversed​_processed​_set Undocumented
Method ​_post​_update Undocumented
Method ​_synchronize Undocumented
Method ​_verify​_canload Undocumented
Method hasparent return True if the given object instance has a parent, according to the InstrumentedAttribute handled by this DependencyProcessor.
Instance Variable ​_passive​_delete​_flag Undocumented
Instance Variable ​_passive​_update​_flag Undocumented
Instance Variable cascade Undocumented
Instance Variable direction Undocumented
Instance Variable enable​_typechecks Undocumented
Instance Variable key Undocumented
Instance Variable mapper Undocumented
Instance Variable parent Undocumented
Instance Variable passive​_deletes Undocumented
Instance Variable passive​_updates Undocumented
Instance Variable post​_update Undocumented
Instance Variable prop Undocumented
Instance Variable secondary Undocumented
Instance Variable sort​_key Undocumented
def _key_switchers(self, uow, states):

Undocumented

def _pks_changed(self, uowcommit, state):
def _process_key_switches(self, deplist, uowcommit):

Undocumented

def per_property_flush_actions(self, uow):
def per_property_preprocessors(self, uow):

establish actions and dependencies related to a flush.

These actions will operate on all relevant states in the aggregate.

def per_state_flush_actions(self, uow, states, isdelete):

establish actions and dependencies related to a flush.

These actions will operate on all relevant states individually. This occurs only if there are cycles in the 'aggregated' version of events.

def presort_deletes(self, uowcommit, states):
def presort_saves(self, uow, states):
def process_deletes(self, uowcommit, states):
def process_saves(self, uowcommit, states):
def prop_has_changes(self, uow, states, isdelete):