From 6008129ed5c3e97eaacec8bb4242666bf7ac0e4c Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 25 May 2006 18:30:36 +0000 Subject: [PATCH] some TODOs --- lib/sqlalchemy/orm/unitofwork.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/sqlalchemy/orm/unitofwork.py b/lib/sqlalchemy/orm/unitofwork.py index 7d05678dd7..c6c4055f84 100644 --- a/lib/sqlalchemy/orm/unitofwork.py +++ b/lib/sqlalchemy/orm/unitofwork.py @@ -607,10 +607,18 @@ class UOWTask(object): def execute(self, trans): """executes this UOWTask. saves objects to be saved, processes all dependencies that have been registered, and deletes objects to be deleted. """ + + # a "circular" task is a circularly-sorted collection of UOWTask/UOWTaskElements + # derived from the components of this UOWTask, which accounts for inter-row dependencies. + # if one was created for this UOWTask, it replaces the execution for this UOWTask. if self.circular is not None: self.circular.execute(trans) return + # TODO: apply the same recursive inheritance logic to the cyclical tasks/dependencies + # TODO: add a visitation system to the UOW classes and have this execution called + # from a separate executor object ? (would also handle dumping) + self._save_objects(trans) for dep in self.cyclical_dependencies: dep.execute(trans, False) @@ -784,7 +792,7 @@ class UOWTask(object): return buf.getvalue() def _dump(self, buf, indent=0, circularparent=None): - + # TODO: the dumper should go into a separate module/class, allow different dumper implementations def _indent(): return " | " * indent -- 2.47.3