diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-24 19:11:01 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-24 19:11:01 -0400 |
| commit | 1675811029553501bb23084604c64d974dfe739c (patch) | |
| tree | 7e3c29f55c562aab06a48b6b4727f59156ed6722 /test/perf | |
| parent | 290a1596ce6f806aa6f25dd754cf0d2197f160ff (diff) | |
| download | sqlalchemy-1675811029553501bb23084604c64d974dfe739c.tar.gz | |
- To accomodate the fact that there are now two kinds of eager
loading available, the new names for eagerload() and
eagerload_all() are joinedload() and joinedload_all(). The
old names will remain as synonyms for the foreseeable future.
- The "lazy" flag on the relationship() function now accepts
a string argument for all kinds of loading: "select", "joined",
"subquery", "noload" and "dynamic", where the default is now
"select". The old values of True/
False/None still retain their usual meanings and will remain
as synonyms for the foreseeable future.
- Added documentation to tutorial,mapper doc, api docs
for subqueryload, subqueryload_all, and other options.
Diffstat (limited to 'test/perf')
| -rw-r--r-- | test/perf/masseagerload.py | 6 | ||||
| -rw-r--r-- | test/perf/ormsession.py | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/perf/masseagerload.py b/test/perf/masseagerload.py index 3d251c816..ab3f00fa4 100644 --- a/test/perf/masseagerload.py +++ b/test/perf/masseagerload.py @@ -35,8 +35,8 @@ def load(): #print l subitems.insert().execute(*l) -@profiling.profiled('masseagerload', always=True, sort=['cumulative']) -def masseagerload(session): +@profiling.profiled('massjoinedload', always=True, sort=['cumulative']) +def massjoinedload(session): session.begin() query = session.query(Item) l = query.all() @@ -46,7 +46,7 @@ def all(): meta.create_all() try: load() - masseagerload(create_session()) + massjoinedload(create_session()) finally: meta.drop_all() diff --git a/test/perf/ormsession.py b/test/perf/ormsession.py index fc3e2e206..0df440aab 100644 --- a/test/perf/ormsession.py +++ b/test/perf/ormsession.py @@ -152,8 +152,8 @@ def run_queries(): q = session.query(Purchase). \ order_by(desc(Purchase.purchase_date)). \ limit(50).\ - options(eagerload('items'), eagerload('items.subitems'), - eagerload('customer')) + options(joinedload('items'), joinedload('items.subitems'), + joinedload('customer')) report = [] # "write" the report. pretend it's going to a web template or something, |
