tori.db.uow

class tori.db.uow.DependencyNode(record)

Dependency Node

This is designed to be bi-directional to maximize flexibility on traversing the graph.

class tori.db.uow.UnitOfWork(entity_manager)

Unit of Work

This Unit of Work (UOW) is designed specifically for non-relational databases.

Note

It is the design decision to make sub-commit methods available so that when it is used with Imagination Framework, the other Imagination entity may intercept before or after actually committing data. In the other word, Imagination Framework acts as an event controller for any actions (public methods) of this class.

refresh(entity)

Refresh the entity

Note

This method

Parameters:entity (object) – the target entity
register_clean(entity)

Register the entity with the clean bit

Parameters:entity (object) – the entity to register
register_deleted(entity)

Register the entity with the removal bit

Parameters:entity (object) – the entity to register
register_dirty(entity)

Register the entity with the dirty bit

Parameters:entity (object) – the entity to register
register_new(entity)

Register a new entity

Parameters:entity (object) – the entity to register