[sqlalchemy] emulating spreadsheet in db

2008-11-08 Thread Faheem Mitha
Hi, I've got some genome data, and I'm trying to move it into a db. The data looks like Patient FOOSNPBARSNP ... Tom AA AT John AT AA ... These columns correspond to SNPS

[sqlalchemy] Using deferred with declarative

2008-11-08 Thread Allen Bierbaum
We have been using the declarative successfully in our codebase for a couple months now with 0.4.x, but we have just run into a problem. We have a table we we want to map using declarative but we want to have one of the columns be deferred because it contains binary data. Unfortunately we can't

[sqlalchemy] Re: schema inspection api

2008-11-08 Thread Michael Bayer
On Nov 7, 2008, at 11:13 PM, Randall Smith wrote: reflecttable is very monolithic. Breaking it down into smaller components will make it easier to test. I follow you on adding methods to the Dialects and that seems like a good place for them. I don't know what kind of API

[sqlalchemy] Re: SQLAlchemy 0.5.0rc3 Released

2008-11-08 Thread Michael Bayer
On Nov 8, 2008, at 1:44 AM, Eric Ongerth wrote: Mike. You have absolutely perfect spelling. Better than 99% of the population. But there is just this one, and only one, English word that you spell strangely. there was another, which was the ensure/insure confusion. J Ellis slapped me

[sqlalchemy] Re: Using deferred with declarative

2008-11-08 Thread Michael Bayer
On Nov 8, 2008, at 12:32 PM, Allen Bierbaum wrote: We have been using the declarative successfully in our codebase for a couple months now with 0.4.x, but we have just run into a problem. We have a table we we want to map using declarative but we want to have one of the columns be

[sqlalchemy] How to handle using master and number of slaves

2008-11-08 Thread Mike Bernson
I am looking at how to have 2 engines a session. I want to be able to switch between engine used based on if any writes will be happening to the data being read. I can tell if any data will be modify by if the transaction started by issues a begin. I want to setup a number of server doing

[sqlalchemy] problem with join, count on 0.5.0rc3

2008-11-08 Thread Greg
This following request works fine and produce the result I was expecting session.query(UserRss, Rss, Item).join([Rss, Item]). But count doesn't work. Is it a bug, or did I miss something ? str(session.query(UserRss, Rss, Item).join([Rss, Item]).count()) Traceback (most recent call last):

[sqlalchemy] Re: How to handle using master and number of slaves

2008-11-08 Thread Michael Bayer
On Nov 8, 2008, at 3:07 PM, Mike Bernson wrote: I am looking at how to have 2 engines a session. I want to be able to switch between engine used based on if any writes will be happening to the data being read. I can tell if any data will be modify by if the transaction started by issues

[sqlalchemy] Re: problem with join, count on 0.5.0rc3

2008-11-08 Thread Michael Bayer
it doesn't know which class on the left side you'd like to join from. so its looking for: sess.query(A, B, C).join((B, A.bs), (C, B.cs)) alternatively, instead of A.bs etc. you can spell out the join condition such as A.b_id==B.id in each tuple. On Nov 8, 2008, at 3:03 PM, Greg wrote:

[sqlalchemy] Re: problem with join, count on 0.5.0rc3

2008-11-08 Thread Michael Bayer
oh sorry, also count() is meant to count instances of a single kind of object. So in fact you should be saying: session.query(UserRss).join(Rss, item).count() On Nov 8, 2008, at 3:03 PM, Greg wrote: This following request works fine and produce the result I was expecting

[sqlalchemy] Re: problem with join, count on 0.5.0rc3

2008-11-08 Thread Michael Bayer
here's the new error message in the latest trunk: InvalidRequestError: Can't issue count() for multiple types of objects or columns. Construct the Query against a single element as the thing to be counted, or for an actual row count use Query(func.count(somecolumn)) or

[sqlalchemy] Re: How to handle using master and number of slaves

2008-11-08 Thread Mike Bernson
Glad to known that it that simple. Thanks Michael Bayer wrote: On Nov 8, 2008, at 3:07 PM, Mike Bernson wrote: I am looking at how to have 2 engines a session. I want to be able to switch between engine used based on if any writes will be happening to the data being read. I can tell

[sqlalchemy] Re: schema inspection api

2008-11-08 Thread Randall Smith
Michael Bayer wrote: The structure of the API would drive the current reflection API to become more componentized. What we see as a need on the public refleciton API side would drive the currently monolithic reflection methods to be changed. The current reflecttable() methods in turn

[sqlalchemy] Re: SQLAlchemy 0.5.0rc3 Released

2008-11-08 Thread empty
there was another, which was the ensure/insure confusion.  J Ellis   slapped me down a long time ago on that one and I've since stopped   selling insurance. Found a few more and corrected. You consistently spell propagate as propigate.   Is there any way we can get an i/a switch in

[sqlalchemy] Re: mssql reflection fk issue

2008-11-08 Thread empty
When reflecting a MSSQL table with a foreign key, the referenced table fails to load with the error: sqlalchemy.exc.NoSuchTableError: [referenced_table] Give the latest trunk a try and let me know. It should have been corrected in r5266. Thanks, Michael