[sqlalchemy] execute() and commit() and commit

2010-02-12 Thread Bob Farrell
decided to add transactions to it so I need a sane way to deal with commit being typed. I'd like to make this behaviour optional so that it can mimic other sql repls such as sqlplus. Any suggestions on the best way to go about doing this are welcome. Thanks, -- Bob Farrell -- You received

[sqlalchemy] Re: execute() and commit() and commit

2010-02-12 Thread Bob Farrell
to the database and it's processing correctly, but SQLAlchemy is stepping in somewhere on the way back before the execute() returns and causing some mischief. On Feb 12, 12:19 pm, Bob Farrell robertanthonyfarr...@googlemail.com wrote: Hi there, I'm having a bit of trouble with session.execute

[sqlalchemy] Re: execute() and commit() and commit

2010-02-12 Thread Bob Farrell
for sqlite). Thanks, On Feb 12, 12:33 pm, Bob Farrell robertanthonyfarr...@googlemail.com wrote: Sorry, I forgot to mention that if I run my select * from test; *after* I get the error for test3, it shows that insert did in fact get committed to the database: {. b...@mote: ~/dev/sasqlconsole

[sqlalchemy] Re: Changes in exc.py causing problems.

2009-05-27 Thread Bob Farrell
Hooray. \o/ I'll leave the code commented until I pull the next release. Cheers, On May 26, 6:03 pm, Michael Bayer mike...@zzzcomputing.com wrote: this is all fixed in the current trunk.  release probably today as the issue you have below is more severe than the one I had noticed. Bob

[sqlalchemy] Re: Possible bug in orm/state.py

2009-05-26 Thread Bob Farrell
On May 23, 7:56 pm, Michael Bayer mike...@zzzcomputing.com wrote: On May 23, 2009, at 1:47 PM, Bob Farrell wrote: Hi, using scoped_session(sessionmaker()) to create my sessions, if I hammer a request (using Pylons) by repeatedly clicking on a link that uses the ORM somewhat

[sqlalchemy] Re: Possible bug in orm/state.py

2009-05-26 Thread Bob Farrell
On May 26, 3:31 pm, Michael Bayer mike...@zzzcomputing.com wrote: Bob Farrell wrote: Hi Michael, I found this (your writing) in a thread from quite a while back: A common pattern which can cause what you see there is if your templates are accessing lazy loaders on objects

[sqlalchemy] Changes in exc.py causing problems.

2009-05-26 Thread Bob Farrell
Hi hi. £ diff SQLAlchemy-0.5.2-py2.5.egg/sqlalchemy/exc.py SQLAlchemy-0.5.4p1- py2.5.egg/sqlalchemy/exc.py 134a135,139 if len(self.params) 10: return ' '.join((SQLAlchemyError.__str__(self), repr(self.statement),

[sqlalchemy] Possible bug in orm/state.py

2009-05-23 Thread Bob Farrell
Hi, using scoped_session(sessionmaker()) to create my sessions, if I hammer a request (using Pylons) by repeatedly clicking on a link that uses the ORM somewhat extensively for the relevant request, it seems that another thread is getting involved with SQLAlchemy internals and pulling the rug out

[sqlalchemy] Extended Query subclass with add_named_column method

2009-03-31 Thread Bob Farrell
Hello, SQLAlchemy people, So I spoke to jek on IRC to see if there was a way to use add_column without causing the query to return a RowTuple and it doesn't look like there is, so I wrote this: class AdditiveQuery(Query): Extended sqlalchemy.orm.Query class with add_named_column method

[sqlalchemy] Re: Extended Query subclass with add_named_column method

2009-03-31 Thread Bob Farrell
the relation on the mapper ? If there's a way to do this in SQLAlchemy that doesn't need extra mapper config then I'm all ears. :-) On Mar 31, 3:22 pm, Michael Bayer mike...@zzzcomputing.com wrote: wouldn't this be accomplished more simply using contains_eager() ? On Mar 31, 2009, at 9:12 AM, Bob

[sqlalchemy] Re: Textual SQL

2009-02-02 Thread Bob Farrell
whack together with other constructs. See the docs here for more info: http://www.sqlalchemy.org/docs/05/sqlexpression.html#using-text Thanks! -- -- Bob Farrell pH, an Experian Company www.phgroup.com Office Line: 020 7598 0310 Fax: 020 7598 0311

[sqlalchemy] Postgres and count() weirdness

2009-01-29 Thread Bob Farrell
. :-) -- -- Bob Farrell pH, an Experian Company www.phgroup.com Office Line: 020 7598 0310 Fax: 020 7598 0311 -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[sqlalchemy] Re: Orphans not deleted using cascade parameter

2008-08-28 Thread Bob Farrell
a print as the first line of the function, nothing got printed out, weird... (maybe my lack of skills using python, yet :P) Alex, Weird. I've attached it here so maybe that will make things work. -- -- Bob Farrell pH, an Experian Company www.phgroup.com Office Line: 020

[sqlalchemy] Re: Orphans not deleted using cascade parameter

2008-08-27 Thread Bob Farrell
: cond = x == y yield delete( obj_table, cond ) -- -- Bob Farrell pH, an Experian Company www.phgroup.com Office Line: 020 7598 0310 Fax: 020 7598 0311 -- --~--~-~--~~~---~--~~ You received

[sqlalchemy] Cascading delete

2008-08-21 Thread Bob Farrell
think there's room for something like this in SA then it's all yours. :-) Cheers, -- -- Bob Farrell pH, an Experian Company www.phgroup.com Office Line: 020 7598 0310 Fax: 020 7598 0311 -- --~--~-~--~~~---~--~~ You