same as always, but if none found will fall back to trying
pkg_resources to load an external module [ticket:521]
- sql:
+ - keys() of result set columns are not lowercased, come back
+ exactly as they're expressed in cursor.description. note this
+ causes colnames to be all caps in oracle.
- preliminary support for unicode table names, column names and
SQL statements added, for databases which can support them.
Works with sqlite and postgres so far. Mysql *mostly* works
def test_union(self):
(s1, s2) = (
- select([t1.c.col3, t1.c.col4], t1.c.col2.in_("t1col2r1", "t1col2r2")),
- select([t2.c.col3, t2.c.col4], t2.c.col2.in_("t2col2r2", "t2col2r3"))
+ select([t1.c.col3.label('col3'), t1.c.col4], t1.c.col2.in_("t1col2r1", "t1col2r2")),
+ select([t2.c.col3.label('col3'), t2.c.col4], t2.c.col2.in_("t2col2r2", "t2col2r3"))
)
- u = union(s1, s2, order_by=[s1.c.col3])
+ u = union(s1, s2, order_by=['col3'])
assert u.execute().fetchall() == [('aaa', 'aaa'), ('bbb', 'bbb'), ('bbb', 'ccc'), ('ccc', 'aaa')]
assert u.alias('bar').select().execute().fetchall() == [('aaa', 'aaa'), ('bbb', 'bbb'), ('bbb', 'ccc'), ('ccc', 'aaa')]