Re: [sqlalchemy] Error with union() + bindparam

2015-07-19 Thread Mike Bayer
On 7/19/15 11:44 AM, Eli Collins wrote: Unfortunately for me, my actual application's text() clause is a larger, more complex bit of sql. I know it's not ideal, but is there a way to wrap the existing TextClause without having to build the whole expression programmatically? E.g. wrap/coerce

Re: [sqlalchemy] Error with union() + bindparam

2015-07-19 Thread Eli Collins
Unfortunately for me, my actual application's text() clause is a larger, more complex bit of sql. I know it's not ideal, but is there a way to wrap the existing TextClause without having to build the whole expression programmatically? E.g. wrap/coerce the TextClause into a ColumnElement; or

[sqlalchemy] Error with union() + bindparam

2015-07-18 Thread Eli Collins
Hi All - I'm currently trying to use sql.union() to construct a union of sql.select() instances. My problem is that one of the columns in one of the selects is an expression that takes a bind parameter, which is causing an error. I initially tried to code things as follows ... from

Re: [sqlalchemy] Error with union() + bindparam

2015-07-18 Thread Mike Bayer
On 7/18/15 12:35 PM, Eli Collins wrote: Hi All - I'm currently trying to use sql.union() to construct a union of sql.select() instances. My problem is that one of the columns in one of the selects is an expression that takes a bind parameter, which is causing an error. I initially tried