Re: [sqlalchemy] a Python-side value or SQL expression is required

2016-01-18 Thread Mike Bayer
On 01/18/2016 02:23 AM, gbr wrote: > |I've upgraded from a SQLA version 0.9.x to 1.0.9. Previously, I did the > following when inserting new records: > > - Column('flag', Boolean, server_default=sql.expression.false()) |||I didn't > set those columns locally and didn't include them in the >

Re: [sqlalchemy] How to label columns of a union?

2016-01-18 Thread Mike Bayer
you'd probably want to specify literal SQL and use label(): literal_column('1').label('bar') On 01/17/2016 10:54 AM, 'Dr. Leo' via sqlalchemy wrote: > Hi, > > consider the following snippet: > > > from sqlalchemy import select, union > u=union(select([1]).alias('foo'),

[sqlalchemy] Re: a Python-side value or SQL expression is required

2016-01-18 Thread gbr
Sorry, I'm having difficulties following your explanation. Would you mind extending on it a bit? that error should only occur if the list of elements you're passing to > insert.values() contains inconsistent keys. As long as each dictionary > has the same keys, that error won't occur. > With

Re: [sqlalchemy] Re: a Python-side value or SQL expression is required

2016-01-18 Thread Mike Bayer
On 01/18/2016 07:41 PM, gbr wrote: > Sorry, I'm having difficulties following your explanation. Would you > mind extending on it a bit? > > that error should only occur if the list of elements you're passing to > insert.values() contains inconsistent keys. As long as each dictionary >

[sqlalchemy] Latest SA version which support Jython

2016-01-18 Thread Jaimy Azle
Hi all, I know jython support was dropped from current version of sqlalchemy, but here I'm stuck to keep use jython in our application due to the Java based technology infrastructures used. In the past I did cancel upgrade from 0.7.2 since 0.7.3 and later introduce delayed import mechanism