[sqlalchemy] Re: what happens on save?

2008-04-28 Thread Eric Lemoine
Thanks Michael for the detailed explanations and the patch. This is really helping! 2008/4/26, Michael Bayer [EMAIL PROTECTED]: On Apr 25, 2008, at 4:21 PM, Eric Lemoine wrote: Module sqlalchemy.orm.mapper:1198 in _postfetch elif not c.primary_key and c.key in params and

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-28 Thread BruceC
We're not intentionally sharing a session between multiple threads... :) I'll check out the code to see if there is any sharing going on, but I'm pretty sure that's not the case. You mention lazy-loading as if it might be playing a part in this issue - is that right? We are using lazy eager

[sqlalchemy] Patch: Ordered merge of ShardedQuery results (Was: Re: [sqlalchemy] Patch: Use generators for ShardedQuery results)

2008-04-28 Thread Kyle Schaffrick
On Sun, 27 Apr 2008 23:35:06 -0400 Kyle Schaffrick [EMAIL PROTECTED] wrote: Since as I mentioned, this is kind of an interesting learning project for me to learn some SA internals, I'd like my next step to be seeing if I can write something that will make a callable/closure which, when passed

[sqlalchemy] Re: cant update mssql table

2008-04-28 Thread Paul Johnston
Hi, a table in a mssql db with a uniqueidentifier field as primary key and an integer field as identity,i am able to insert a row into the table but not update it Can you send the code you're using, and the error you are getting? I think this is an area we haven't particularly covered so far.

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-28 Thread Michael Bayer
On Apr 28, 2008, at 4:04 AM, BruceC wrote: We're not intentionally sharing a session between multiple threads... :) I'll check out the code to see if there is any sharing going on, but I'm pretty sure that's not the case. You mention lazy-loading as if it might be playing a part in this

[sqlalchemy] how return value to the web page

2008-04-28 Thread reetesh
hi all, i have developed one project on login page. i am unable to print the dailouge on the page when user is given wronge password.. can anyone help me... how to print the value on the web page --~--~-~--~~~---~--~~ You received this message because you are

[sqlalchemy] Re: help required urgent

2008-04-28 Thread Michael Bayer
On Apr 25, 2008, at 10:36 AM, sniffer wrote: inserted into an identity column.How do i make SA understand to leave the autoincrement field value i.e. not to insert anything into it and let the field take the default value set in the database. any help will be great i need to turn in this

[sqlalchemy] Concrete inheritance woes

2008-04-28 Thread Gaetan de Menten
Hi there, I've been playing with concrete inheritance a bit these days (trying to implement it into Elixir). I've run into several problems, which might be known limitations, but I'd like to know for sure or be shown what I've done wrong... The two problems I get involve a chain of classes

[sqlalchemy] SQL for (col1, col2) NOT IN (SELECT ...)

2008-04-28 Thread Matthew Zwier
Hi all, I'm trying to run a (non-ORM) query of the form: SELECT job_id, pathname FROM jobfilesTable WHERE (job_id, pathname) NOT IN (SELECT job_id, pathname FROM tempTable) After searching the docs and the mailing list, the best I've been able to come up with is something like: from

[sqlalchemy] Re: SQL for (col1, col2) NOT IN (SELECT ...)

2008-04-28 Thread Michael Bayer
On Apr 28, 2008, at 3:28 PM, Matthew Zwier wrote: Hi all, I'm trying to run a (non-ORM) query of the form: SELECT job_id, pathname FROM jobfilesTable WHERE (job_id, pathname) NOT IN (SELECT job_id, pathname FROM tempTable) After searching the docs and the mailing list, the best I've

[sqlalchemy] Re: Patch: Ordered merge of ShardedQuery results (Was: Re: [sqlalchemy] Patch: Use generators for ShardedQuery results)

2008-04-28 Thread Michael Bayer
On Apr 28, 2008, at 4:34 AM, Kyle Schaffrick wrote: I have taken a first stab at this to play with the idea and it seems to be doing the right thing, the patch also contains some very rudimentary tests in ShardTest that make it voom. very nice ! The patch adds a .merge_ordering()

[sqlalchemy] Re: SQL for (col1, col2) NOT IN (SELECT ...)

2008-04-28 Thread Matthew Zwier
Thanks for the quick reply! I've always been quite impressed with the quality of SA and its support. I'm a bit swamped at work at the moment but I'll see about putting a 'CREATE TEMPORARY TABLE' patch together. MZ On Mon, Apr 28, 2008 at 4:09 PM, Michael Bayer [EMAIL PROTECTED] wrote:

[sqlalchemy] Re: Concrete inheritance woes

2008-04-28 Thread Michael Bayer
On Apr 28, 2008, at 12:07 PM, Gaetan de Menten wrote: pjoin = polymorphic_union({ 'manager':managers_table, 'engineer':engineers_table, 'hacker':hackers_table }, 'type', 'pjoin') mapper(Company, companies, properties={ 'engineers':relation(Engineer,

[sqlalchemy] Re: SQL for (col1, col2) NOT IN (SELECT ...)

2008-04-28 Thread jason kirtland
This could be expanded slightly to include 'prefixes=[]' support ala select() and insert(). Sqlite could use that for creating full text tables, e.g. 'CREATE VIRTUAL TABLE foo (...) USING ...'. I haven't thought about this extensively but I think I'd prefer prefixes=['TEMPORARY'] to a

[sqlalchemy] Re: SQL for (col1, col2) NOT IN (SELECT ...)

2008-04-28 Thread Michael Bayer
On Apr 28, 2008, at 4:41 PM, jason kirtland wrote: This could be expanded slightly to include 'prefixes=[]' support ala select() and insert(). Sqlite could use that for creating full text tables, e.g. 'CREATE VIRTUAL TABLE foo (...) USING ...'. I haven't thought about this extensively

[sqlalchemy] Re: Using declarative when imports happen before create_engine() ??

2008-04-28 Thread Allen Bierbaum
So, if I understand this right, I could import a base module that does a lazy creation of the Base class with a metadata object and then just use that base class everywhere I need it for the declarative class definitions. Then at a later time (before I use the mapped classes), I could go and

[sqlalchemy] Re: Using declarative when imports happen before create_engine() ??

2008-04-28 Thread Michael Bayer
On Apr 28, 2008, at 5:42 PM, Allen Bierbaum wrote: So, if I understand this right, I could import a base module that does a lazy creation of the Base class with a metadata object and then just use that base class everywhere I need it for the declarative class definitions. Then at a later

[sqlalchemy] Patch: Ordered merge of ShardedQuery results (Was: Re: [sqlalchemy] Patch: Use generators for ShardedQuery results)

2008-04-28 Thread Kyle Schaffrick
On Mon, 28 Apr 2008 16:22:44 -0400 Michael Bayer [EMAIL PROTECTED] wrote: so, lets name it _merge_ordering() to start so we have some future leeway on the name. Changes made. Well, in fact the result.close() at the end there is not really needed; when all result rows are exhausted,