[sqlalchemy] Failing to connect to MongoDB BIconnector - a restricted MySQL implementation

2017-05-12 Thread Jonathan Underwood
Hi, I am trying to do use SQLAlchemy with the MongoDB BI connector, which presents itself as a MySQL server. However, the supported operations correspond only to the SQL-99 SELECT operations (i.e. it's a read only server) . See:

Re: [sqlalchemy] Composite column with null property

2017-05-12 Thread Simon King
On Thu, May 11, 2017 at 6:18 PM, wrote: > Hello, > > I have a Money composite column, comprised of an `amount` (Decimal) and a > `currency` (String). Sometimes the amount needs to be NULL, but then I get > an instance of Money(None, 'GBP'). Is there any way to force the

[sqlalchemy] BUG in union with limit in PostgreSQL

2017-05-12 Thread Jarek
Hello! It looks that SQLAlchemy doesn't properly handle union with limits in the following scenario: res1 = Session.query( Messages ).order_by( Messages.ts ).limit(100) res2 = Session.query( Messages1 ).order_by( Messages1.ts ).limit(100) res3 = res1.union_all( res2 ) SQLAlchemy creates

Re: [sqlalchemy] BUG in union with limit in PostgreSQL

2017-05-12 Thread mike bayer
On 05/12/2017 04:55 AM, Jarek wrote: Hello! It looks that SQLAlchemy doesn't properly handle union with limits in the following scenario: res1 = Session.query( Messages ).order_by( Messages.ts ).limit(100) res2 = Session.query( Messages1 ).order_by( Messages1.ts ).limit(100) res3 =

Re: [sqlalchemy] Composite column with null property

2017-05-12 Thread mike bayer
you would need to use the "on load" events to detect this and replace the value with None using set_committed_value() from sqlalchemy.orm import set_committed_value from sqlalchemy import event @event.listens_for(MyClass, "load") @event.listens_for(MyClass, "refresh") def

Re: [sqlalchemy] BUG in union with limit in PostgreSQL

2017-05-12 Thread Jarek
Hello! Sorry, I was using old sqlalchemy, after upgrade it works fine. best regards Jarek Dnia 2017-05-12, piÄ… o godzinie 08:54 -0400, mike bayer pisze: > > On 05/12/2017 04:55 AM, Jarek wrote: > > Hello! > > > > It looks that SQLAlchemy doesn't properly handle union with limits in > >