diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-03-28 11:50:09 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-03-28 11:50:09 -0400 |
commit | d61919118072f4c31ba2ee0bd8c4ac22a92e92f4 (patch) | |
tree | 1dd12ef15aa76f25d048377c518ff0c7f03a7fe7 /test/sql/test_compiler.py | |
parent | 63d2a486bf84f798387bd45db558610b247e0aa5 (diff) | |
download | sqlalchemy-d61919118072f4c31ba2ee0bd8c4ac22a92e92f4.tar.gz |
- Added support for rendering "FULL OUTER JOIN" to both Core and ORM.
Pull request courtesy Stefan Urbanek. fixes #1957
Diffstat (limited to 'test/sql/test_compiler.py')
-rw-r--r-- | test/sql/test_compiler.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py index 66612eb33..dae178d31 100644 --- a/test/sql/test_compiler.py +++ b/test/sql/test_compiler.py @@ -1553,6 +1553,26 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): "mytable.myid = :myid_1 OR myothertable.othername != :othername_1 " "OR EXISTS (select yay from foo where boo = lar)", ) + def test_full_outer_join(self): + for spec in [ + join(table1, table2, table1.c.myid == table2.c.otherid, full=True), + outerjoin( + table1, table2, + table1.c.myid == table2.c.otherid, full=True), + table1.join( + table2, + table1.c.myid == table2.c.otherid, full=True), + table1.outerjoin( + table2, + table1.c.myid == table2.c.otherid, full=True), + ]: + stmt = select([table1]).select_from(spec) + self.assert_compile( + stmt, + "SELECT mytable.myid, mytable.name, mytable.description FROM " + "mytable FULL OUTER JOIN myothertable " + "ON mytable.myid = myothertable.otherid") + def test_compound_selects(self): assert_raises_message( exc.ArgumentError, |