From 7f43bc55e027b6419ac5a9893515ad9581c98538 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 19 Feb 2008 23:46:14 +0000 Subject: - can again create aliases of selects against textual FROM clauses, [ticket:975] --- test/sql/select.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/sql/select.py') diff --git a/test/sql/select.py b/test/sql/select.py index 39906dcdb..f64373d3a 100644 --- a/test/sql/select.py +++ b/test/sql/select.py @@ -625,6 +625,11 @@ WHERE mytable.myid = myothertable.otherid) AS t2view WHERE t2view.mytable_myid = select(["column1 AS foobar", "column2 AS hoho", table1.c.myid], from_obj=[table1]).select(), "SELECT column1 AS foobar, column2 AS hoho, myid FROM (SELECT column1 AS foobar, column2 AS hoho, mytable.myid AS myid FROM mytable)" ) + + self.assert_compile( + select(['col1','col2'], from_obj='tablename').alias('myalias'), + "SELECT col1, col2 FROM tablename" + ) def test_binds_in_text(self): self.assert_compile( -- cgit v1.2.1