Re: [sqlalchemy] Inexplicable NoResultFound error

2015-08-29 Thread Demitri Muna
Hi Michael, On Friday, August 28, 2015 at 11:54:17 AM UTC-4, Michael Bayer wrote: > > > this log shows clearly that the second query is not returning any rows at > the DBAPI driver level - you can see that unlike the first query, there is > no "Row" logged. The query you want to run on your d

Re: [sqlalchemy] Re: how to set assocation proxy pattern with automap

2015-08-29 Thread yoch . melka
Thanks for the reply. Le vendredi 28 août 2015 18:52:37 UTC+3, Michael Bayer a écrit : > > > > On 8/28/15 3:51 AM, yoch@gmail.com wrote: > > Another question is why sqlalchemy produce two queries to get hardwares > collections from a dispositif : > > > >>> some_disp.hardwares > 2015-08-28 10

Re: [sqlalchemy] What about bit fields / bit masks?

2015-08-29 Thread Richard Gerd Kuesters
IMHO, it is better to use ints for masks because they can be indexed by the database. AFAIK, bits can't be indexed and any bit operator in a query (let's say, "WHERE mybit & MYMASK") would probably result in a full table scan. well, it's just my two cents from an info I got a long time ago. I

[sqlalchemy] Inexplicable NoResultFound error

2015-08-29 Thread thatsanicehatyouhave
Hi, I have a script that's basically been running unmodified for years. In it, it performs an SQLAlchemy query that does a simple join between two tables: platePointing = session.query(PlatePointing).join(Plate).filter(Plate.plate_id==plateid).one() Suddenly, I'm getting a "NoResultFound" erro

[sqlalchemy] What about bit fields / bit masks?

2015-08-29 Thread Cornelius Kölbel
Hello, this is maybe more about the database design. I want to store several boolean states of an object. The object may also have more than one state and the available possible states may increase in future. So I want to avoid adding BOOL columns for every new state and I though, hey, what about