insert/update/delete order (topological sort)."""
raise NotImplementedError()
- # TODO: all of these preproc rules need to take dependencies into account
def preprocess_dependencies(self, task, deplist, uowcommit, delete = False):
"""used before the flushes' topological sort to traverse through related objects and insure every
instance which will require save/update/delete is properly added to the UOWTransaction."""
def _compile_synchronizers(self):
"""assembles a list of 'synchronization rules', which are instructions on how to populate
- the objects on each side of a relationship. This is done when a PropertyLoader is
+ the objects on each side of a relationship. This is done when a DependencyProcessor is
first initialized.
The list of rules is used within commits by the _synchronize() method when dependent
return []
def cascade_callable(self, type, object, callable_, recursive=None):
return []
- def copy(self):
- raise NotImplementedError()
def get_criterion(self, query, key, value):
"""Returns a WHERE clause suitable for this MapperProperty corresponding to the
given key/value pair, where the key is a column or object property name, and value
def do_init(self):
"""template method for subclasses"""
pass
- def register_deleted(self, object, uow):
- """called when the instance is being deleted"""
- pass
def register_dependencies(self, *args, **kwargs):
"""called by the Mapper in response to the UnitOfWork calling the Mapper's
register_dependencies operation. Should register with the UnitOfWork all
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""defines a set of mapper.MapperProperty objects, including basic column properties as
-well as relationships. also defines some MapperOptions that can be used with the
-properties."""
+well as relationships. the objects rely upon the LoaderStrategy objects in the strategies.py
+module to handle load operations. PropertyLoader also relies upon the dependency.py module
+to handle flush-time dependency sorting and processing."""
from sqlalchemy import sql, schema, util, attributes, exceptions, sql_util, logging
import mapper
import util as mapperutil
import sets, random
+"""sqlalchemy.orm.interfaces.LoaderStrategy implementations, and related MapperOptions."""
class ColumnLoader(LoaderStrategy):
def init(self):