[sqlalchemy] Re: r3507 breaks here

2007-09-24 Thread Michael Bayer
ive grepped all the code and cannot find a create_row_processor method that is returning a 2-tuple (which is what it used to be); theyre all returning 3-tuples..and of course all those methods have test coverage too. have you tried deleting all the .pyc files to ensure all python

[sqlalchemy] Re: db independent way to get id from sequence

2007-09-24 Thread che
please help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For

[sqlalchemy] detect if objects have been deleted from a session?

2007-09-24 Thread Kumar McMillan
Hello. I have a naive system that links dict-like objects to mapped classes so that rows can be saved to the db. It doesn't know anything about mapped class instances, so many-to-many relationships are [currently] saved by a class mapped to the swing table itself; for example, it's the

[sqlalchemy] Re: db independent way to get id from sequence

2007-09-24 Thread Michael Bayer
On Sep 13, 2007, at 8:19 AM, che wrote: Hi, Are there any database independent way to get the id from some sequence - for databases that supports it? For postgres this can be done by issueing select nextval('name_of_the_sequence') statement, but for other databases like oracle, firebird

[sqlalchemy] ClauseList as a column_property

2007-09-24 Thread Berik Visschers
Hello, Recently I started playing with SQLAlchemy. When implementing some database, I ran into this problem: The very neat column_property feature of SA accepts various constructs like comparisons, subselects and even other sql operators such as addition and concatenation. But boolean

[sqlalchemy] Re: ClauseList as a column_property

2007-09-24 Thread Michael Bayer
On Sep 24, 2007, at 11:15 AM, Berik Visschers wrote: The SQL query I'm trying to map is: SELECT id, begin_date, end_date, begin_date IS NOT NULL OR begin_date = NOW() AND end_date IS NULL OR end_date NOW() AS active FROM package WHERE

[sqlalchemy] Re: db independent way to get id from sequence

2007-09-24 Thread che
id = connection.execute(Sequence('my_sequence')) thanks, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe

[sqlalchemy] plain python objects from ORM

2007-09-24 Thread Huy Do
Hi, Is it possible to get SA ORM to return plain python objects (with eagerloaded relations and all) but without any attribute instrumentation (or anything else magically added by SA). Thanks, Huy --~--~-~--~~~---~--~~ You received this message because you

[sqlalchemy] Re: r3507 breaks here

2007-09-24 Thread Michael Bayer
somethings weird. if i take out your expects/me.query stuff (which remains impossible to read), and do this : session.clear() for o in session.query(A): print str(o) I get this: C( db_id=1 linkA=None linkC=B( id=notset name=ben ) dataC=mc name=cc ) A(

[sqlalchemy] Re: plain python objects from ORM

2007-09-24 Thread Michael Bayer
On Sep 24, 2007, at 11:48 AM, Huy Do wrote: Hi, Is it possible to get SA ORM to return plain python objects (with eagerloaded relations and all) but without any attribute instrumentation (or anything else magically added by SA). not really. unless you remove the instrumentation

[sqlalchemy] Re: r3507 breaks here

2007-09-24 Thread sdobrev
it something to do with that expects thing... just do a x = str(b) before session.clear(), breaks it all. On Monday 24 September 2007 18:57:36 Michael Bayer wrote: somethings weird. if i take out your expects/me.query stuff (which remains impossible to read), and do this :

[sqlalchemy] Re: r3507 breaks here

2007-09-24 Thread Michael Bayer
On Sep 24, 2007, at 12:13 PM, [EMAIL PROTECTED] wrote: it something to do with that expects thing... just do a x = str(b) before session.clear(), breaks it all. OK...that was just a *great* way to spend all day tracking that one down. its fixed in 3515. I didn't bother to see why it

[sqlalchemy] Re: r3507 breaks here

2007-09-24 Thread sdobrev
On Monday 24 September 2007 22:31:35 Michael Bayer wrote: On Sep 24, 2007, at 12:13 PM, [EMAIL PROTECTED] wrote: it something to do with that expects thing... just do a x = str(b) before session.clear(), breaks it all. OK...that was just a *great* way to spend all day tracking that one

[sqlalchemy] Re: 0.4.0beta5 breaks [Oracle] query, works on 0.3.7 and with cxOracle

2007-09-24 Thread m h
Here's another simple testcase that fails for Oracle beta5 but works with 0.3.7. It's about the simplest query I can come up with. Have a table with a date column in it and query against it using the to_date function. def test_to_date(): start_date = '10/05/04' where =

[sqlalchemy] Re: 0.4.0beta5 breaks [Oracle] query, works on 0.3.7 and with cxOracle

2007-09-24 Thread Michael Bayer
sorry, i havent forgotten you. just have to get the time to power up my oracle box. thanks for putting in the ticket. On Sep 24, 2007, at 7:22 PM, m h wrote: Here's another simple testcase that fails for Oracle beta5 but works with 0.3.7. It's about the simplest query I can come up

[sqlalchemy] best practices for catching sqlerrors

2007-09-24 Thread Ron
In my application I'd like db related errors that are encountered when using mapped classes to have better exceptions that make more sense in the context of my program. Where is the best place to put this stuff? For example, say I have a table with a single primary_key column and I have a class

[sqlalchemy] Re: plain python objects from ORM

2007-09-24 Thread Huy Do
Michael Bayer wrote: On Sep 24, 2007, at 11:48 AM, Huy Do wrote: Hi, Is it possible to get SA ORM to return plain python objects (with eagerloaded relations and all) but without any attribute instrumentation (or anything else magically added by SA). not really. unless

[sqlalchemy] Re: 0.4.0beta5 breaks [Oracle] query, works on 0.3.7 and with cxOracle

2007-09-24 Thread m h
NP, I know Oracle is a drag but that's what the client has. Perhaps if you could clarify why I'm confused I might be able to help debug. (I've stepped through expression.py all day long). I feel like I just need a little hint or push in the right direction. Eventually you get to a cx

[sqlalchemy] Re: plain python objects from ORM

2007-09-24 Thread sdobrev
On Tuesday 25 September 2007 05:43:40 Huy Do wrote: Michael Bayer wrote: On Sep 24, 2007, at 11:48 AM, Huy Do wrote: Hi, Is it possible to get SA ORM to return plain python objects (with eagerloaded relations and all) but without any attribute instrumentation (or anything else

[sqlalchemy] Re: r3507 breaks here

2007-09-24 Thread sdobrev
On Monday 24 September 2007 22:31:35 Michael Bayer wrote: On Sep 24, 2007, at 12:13 PM, [EMAIL PROTECTED] wrote: it something to do with that expects thing... just do a x = str(b) before session.clear(), breaks it all. OK...that was just a *great* way to spend all day tracking that one