Re: [sqlalchemy] Postgres not(any_) issue within recursive CTE

2016-07-20 Thread Mike Bayer
On 07/20/2016 07:53 PM, cledo...@twistbioscience.com wrote: Hi, I'm very glad to see the any_ operator fully supported in SqlAlchemy 1.1b2. We'd like to use this operator to implement an efficient recursive CTE (RCTE) that avoids cycles. One way to get an RCTE to avoid cycles is to maintain

[sqlalchemy] Postgres not(any_) issue within recursive CTE

2016-07-20 Thread cledogar
Hi, I'm very glad to see the any_ operator fully supported in SqlAlchemy 1.1b2. We'd like to use this operator to implement an efficient recursive CTE (RCTE) that avoids cycles. One way to get an RCTE to avoid cycles is to maintain an array of visited nodes or links, then to check for

Re: [sqlalchemy] automap_base from MySQL doesn't setup all tables in Base.classes but they are in metadata.tables

2016-07-20 Thread Mike Bayer
On 07/20/2016 04:44 PM, bkcsfi sfi wrote: I have a legacy MySQL database that I am working with sqla version 1.0.11 and MySQL-Python engine (just upgraded to 1.0.14, problem persists) I use automap_base and prepare with reflect=True some of the tables in this database are association tables.

[sqlalchemy] automap_base from MySQL doesn't setup all tables in Base.classes but they are in metadata.tables

2016-07-20 Thread bkcsfi sfi
I have a legacy MySQL database that I am working with sqla version 1.0.11 and MySQL-Python engine (just upgraded to 1.0.14, problem persists) I use automap_base and prepare with reflect=True some of the tables in this database are association tables. Those tables do show up in metadata, e.g.

Re: [sqlalchemy] Problem with 'fetchone'

2016-07-20 Thread Tian JiaLin
Add some updates here. I found every time I got this problem, the affected rows is 18446744073709552000. On Tue, Jul 19, 2016 at 2:13 AM, Tian JiaLin wrote: > Thanks for the reply, Mike. > > Actually there is no obvious errors, furthermore with a lower percentage >

Re: [sqlalchemy] Combining yield_per and eager loading

2016-07-20 Thread Martijn van Oosterhout
Ok, so this is what I have for today. It works, and handles all kinds of corner cases and yet it's not quite what I want. It does everything as a joinedload. It's much easier to use now though. You can do things like: q = Session.query(Animal) for animal in yielded_load(q,

Re: [sqlalchemy] Error IM001 reflecting table

2016-07-20 Thread Angelo Bulone
Ok, I will do a try with another python library. I would prefer to consider to change sql driver only as last chance. Thank you! Il giorno martedì 19 luglio 2016 17:16:21 UTC+2, Mike Bayer ha scritto: > > > > On 07/19/2016 04:50 AM, Angelo Bulone wrote: > > first of all, sorry if I'm not

Re: [sqlalchemy] Combining yield_per and eager loading

2016-07-20 Thread Martijn van Oosterhout
On 19 July 2016 at 23:22, Mike Bayer wrote: > > > On 07/19/2016 05:20 PM, Martijn van Oosterhout wrote: > >> >> >> Thanks. On the way home though I had a thought: wouldn't it be simpler >> to run the original query with yield_from(), and then after each block >> run the