compound expressions, courtesy btbuilder.
[ticket:2490]
+ - [bug] Fixed bug whereby append_column()
+ wouldn't function correctly on a cloned
+ select() construct, courtesy
+ Gunnlaugur Þór Briem. [ticket:2482]
+
- engine
- [bug] Fixed memory leak in C version of
result proxy whereby DBAPIs which don't deliver
co.proxies = [self]
if selectable._is_clone_of is not None:
co._is_clone_of = \
- selectable._is_clone_of.columns[key]
+ selectable._is_clone_of.columns.get(key)
selectable._columns[key] = co
return co
c.proxies = [self]
if selectable._is_clone_of is not None:
c._is_clone_of = \
- selectable._is_clone_of.columns[c.name]
+ selectable._is_clone_of.columns.get(c.name)
if attach:
selectable._columns[c.name] = c
assert j2.corresponding_column(table1.c.col1) \
is j2.c.table1_col1
+ def test_clone_append_column(self):
+ sel = select([literal_column('1').label('a')])
+ cloned = visitors.ReplacingCloningVisitor().traverse(sel)
+ cloned.append_column(literal_column('2').label('b'))
+ cloned.append_column(func.foo())
+ eq_(cloned.c.keys(), ['a', 'b', 'foo()'])
+
def test_against_cloned_non_table(self):
# test that corresponding column digs across
# clone boundaries with anonymous labeled elements