diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-13 19:27:14 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-13 19:27:14 +0000 |
commit | ffe0ab5ba62be5df4c18829131cd58a52966d3b7 (patch) | |
tree | 2a99d07ffb25544c6fbc107fb00bec9e80bed9bf /lib/sqlalchemy/orm/interfaces.py | |
parent | 6b10e0b26d226258d5cbcbb686629c9b82e9266b (diff) | |
download | sqlalchemy-ffe0ab5ba62be5df4c18829131cd58a52966d3b7.tar.gz |
- For those who might use debug logging on
sqlalchemy.orm.strategies, most logging calls during row
loading have been removed. These were never very helpful
and cluttered up the code.
- Some internal streamlining of object loading grants a
small speedup for large results, estimates are around
10-15%.
Diffstat (limited to 'lib/sqlalchemy/orm/interfaces.py')
-rw-r--r-- | lib/sqlalchemy/orm/interfaces.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py index 0077f3e6a..75f9d4438 100644 --- a/lib/sqlalchemy/orm/interfaces.py +++ b/lib/sqlalchemy/orm/interfaces.py @@ -420,7 +420,8 @@ class MapperProperty(object): pass def create_row_processor(self, selectcontext, path, mapper, row, adapter): - """Return a 2-tuple consiting of two row processing functions and an instance post-processing function. + """Return a 2-tuple consiting of two row processing functions and + an instance post-processing function. Input arguments are the query.SelectionContext and the *first* applicable row of a result set obtained within @@ -435,16 +436,13 @@ class MapperProperty(object): Callables are of the following form:: - def new_execute(state, dict_, row, **flags): + def new_execute(state, dict_, row, isnew): # process incoming instance state and given row. the instance is # "new" and was just created upon receipt of this row. - # flags is a dictionary containing at least the following - # attributes: - # isnew - indicates if the instance was newly created as a - # result of reading this row - # instancekey - identity key of the instance + "isnew" indicates if the instance was newly created as a + result of reading this row - def existing_execute(state, dict_, row, **flags): + def existing_execute(state, dict_, row): # process incoming instance state and given row. the instance is # "existing" and was created based on a previous row. |