diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-01-15 17:08:56 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-01-15 17:08:56 +0000 |
| commit | 454f1d7f583a6530c28b2ca86235695d6952d292 (patch) | |
| tree | 2a7ad604378304403b4e0253030f0ca1cfc688c3 /test/sql | |
| parent | 37b7e458c201a2f7788f3db8d85bed2ab2f8e190 (diff) | |
| download | sqlalchemy-454f1d7f583a6530c28b2ca86235695d6952d292.tar.gz | |
- Query.from_self() as well as query.subquery() both disable
the rendering of eager joins inside the subquery produced.
The "disable all eager joins" feature is available publically
via a new query.enable_eagerloads() generative. [ticket:1276]
- Added a rudimental series of set operations to Query that
receive Query objects as arguments, including union(),
union_all(), intersect(), except_(), insertsect_all(),
except_all(). See the API documentation for
Query.union() for examples.
- Fixed bug that prevented Query.join() and eagerloads from
attaching to a query that selected from a union or aliased union.
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/generative.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/sql/generative.py b/test/sql/generative.py index 39a72d89b..2072fb75e 100644 --- a/test/sql/generative.py +++ b/test/sql/generative.py @@ -284,6 +284,11 @@ class ClauseTest(TestBase, AssertsCompiledSQL): assert str(u) == str(u2) == str(u3) assert u2.compile().params == {'id_param':7} assert u3.compile().params == {'id_param':10} + + def test_adapt_union(self): + u = union(t1.select().where(t1.c.col1==4), t1.select().where(t1.c.col1==5)).alias() + + assert sql_util.ClauseAdapter(u).traverse(t1) is u def test_binds(self): """test that unique bindparams change their name upon clone() to prevent conflicts""" |
