diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-08-29 15:07:11 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-08-29 15:07:11 -0400 |
| commit | 9449c102768e9dc14d28405caec31a9957d52408 (patch) | |
| tree | f0e7c635a78b40adb0ff26fc3ca72b3a1e34bd9c /lib/sqlalchemy/orm/interfaces.py | |
| parent | b9046a163bd94ea9101e13414682280e56a677e6 (diff) | |
| download | sqlalchemy-9449c102768e9dc14d28405caec31a9957d52408.tar.gz | |
- reorganize how create_row_processor() communicates up to
instances(), using a named tuple it can assign to directly. this way
we never have to worry about that structure changing anymore, though
we are still having it append (key, fn) which is kind of awkward.
- inline _populators() into instance(), it's a little verbose but
saves an fn call
Diffstat (limited to 'lib/sqlalchemy/orm/interfaces.py')
| -rw-r--r-- | lib/sqlalchemy/orm/interfaces.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py index 145c9b6e8..47ee4c076 100644 --- a/lib/sqlalchemy/orm/interfaces.py +++ b/lib/sqlalchemy/orm/interfaces.py @@ -82,11 +82,11 @@ class MapperProperty(_MappedAttribute, InspectionAttr): pass def create_row_processor(self, context, path, - mapper, result, adapter): + mapper, result, adapter, populators): """Return a 3-tuple consisting of three row processing functions. """ - return None, None, None, None + pass def cascade_iterator(self, type_, state, visited_instances=None, halt_on=None): @@ -443,14 +443,17 @@ class StrategizedProperty(MapperProperty): strat = self.strategy strat.setup_query(context, entity, path, loader, adapter, **kwargs) - def create_row_processor(self, context, path, mapper, result, adapter): + def create_row_processor( + self, context, path, mapper, + result, adapter, populators): loader = self._get_context_loader(context, path) if loader and loader.strategy: strat = self._get_strategy(loader.strategy) else: strat = self.strategy - return strat.create_row_processor(context, path, loader, - mapper, result, adapter) + strat.create_row_processor( + context, path, loader, + mapper, result, adapter, populators) def do_init(self): self._strategies = {} @@ -543,14 +546,14 @@ class LoaderStrategy(object): pass def create_row_processor(self, context, path, loadopt, mapper, - result, adapter): + result, adapter, populators): """Return row processing functions which fulfill the contract specified by MapperProperty.create_row_processor. StrategizedProperty delegates its create_row_processor method directly to this method. """ - return None, None, None, None + pass def __str__(self): return str(self.parent_property) |
