class documentation

class UOWTransaction: (source)

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method execute Undocumented
Method filter_states_for_dep Filter the given list of InstanceStates to those relevant to the given DependencyProcessor.
Method finalize_flush_changes Mark processed objects as clean / deleted after a successful flush().
Method get_attribute_history Facade to attributes.get_state_history(), including caching of results.
Method has_dep Undocumented
Method is_deleted Return ``True`` if the given state is marked as deleted within this uowtransaction.
Method memo Undocumented
Method register_object Undocumented
Method register_post_update Undocumented
Method register_preprocessor Undocumented
Method remove_state_actions Remove pending actions for a state from the uowtransaction.
Method states_for_mapper_hierarchy Undocumented
Method was_already_deleted Return ``True`` if the given state is expired and was deleted previously.
Class Variable transaction Undocumented
Instance Variable attributes Undocumented
Instance Variable cycles Undocumented
Instance Variable dependencies Undocumented
Instance Variable deps Undocumented
Instance Variable mappers Undocumented
Instance Variable post_update_states Undocumented
Instance Variable postsort_actions Undocumented
Instance Variable presort_actions Undocumented
Instance Variable session Undocumented
Instance Variable states Undocumented
Property has_work Undocumented
Method _generate_actions Generate the full, unsorted collection of PostSortRecs as well as dependency pairs for this UOWTransaction.
Method _per_mapper_flush_actions Undocumented
Property _mapper_for_dep return a dynamic mapping of (Mapper, DependencyProcessor) to True or False, indicating if the DependencyProcessor operates on objects of that Mapper.
def __init__(self, session: Session): (source)

Undocumented

def execute(self): (source)

Undocumented

def filter_states_for_dep(self, dep, states): (source)

Filter the given list of InstanceStates to those relevant to the given DependencyProcessor.

def finalize_flush_changes(self): (source)

Mark processed objects as clean / deleted after a successful flush(). This method is called within the flush() method after the execute() method has succeeded and the transaction has been committed.

def get_attribute_history(self, state, key, passive=attributes.PASSIVE_NO_INITIALIZE): (source)

Facade to attributes.get_state_history(), including caching of results.

def has_dep(self, processor): (source)

Undocumented

def is_deleted(self, state): (source)

Return ``True`` if the given state is marked as deleted within this uowtransaction.

def memo(self, key, callable_): (source)

Undocumented

def register_object(self, state: InstanceState[Any], isdelete: bool = False, listonly: bool = False, cancel_delete: bool = False, operation: Optional[str] = None, prop: Optional[MapperProperty] = None) -> bool: (source)

Undocumented

def register_post_update(self, state, post_update_cols): (source)

Undocumented

def register_preprocessor(self, processor, fromparent): (source)

Undocumented

def remove_state_actions(self, state): (source)

Remove pending actions for a state from the uowtransaction.

def states_for_mapper_hierarchy(self, mapper, isdelete, listonly): (source)

Undocumented

def was_already_deleted(self, state): (source)

Return ``True`` if the given state is expired and was deleted previously.

Undocumented

attributes: dict = (source)

Undocumented

Undocumented

dependencies = (source)

Undocumented

Undocumented

Undocumented

post_update_states = (source)

Undocumented

postsort_actions: dict = (source)

Undocumented

presort_actions: dict = (source)

Undocumented

Undocumented

Undocumented

Undocumented

def _generate_actions(self): (source)

Generate the full, unsorted collection of PostSortRecs as well as dependency pairs for this UOWTransaction.

def _per_mapper_flush_actions(self, mapper): (source)

Undocumented

@util.memoized_property
_mapper_for_dep = (source)

return a dynamic mapping of (Mapper, DependencyProcessor) to True or False, indicating if the DependencyProcessor operates on objects of that Mapper. The result is stored in the dictionary persistently once calculated.