Re: [sqlalchemy] Re: engine bound to Session

2010-05-31 Thread Eric Lemoine
On Sun, May 30, 2010 at 6:20 PM, Lance Edgar lance.ed...@gmail.com wrote: On 5/30/2010 9:43 AM, Eric Lemoine wrote: On Sun, May 30, 2010 at 4:39 PM, Eric Lemoine eric.lemo...@camptocamp.com  wrote: Hello I use Pylons. Pylons does: Session = scoped_session(sessionmaker()) and then:

Re: [sqlalchemy] Re: For each begin_nested() call, a corresponding rollback() or commit() must be issued.

2010-05-31 Thread Kent Bower
On 5/30/2010 1:24 PM, Michael Bayer wrote: On May 28, 2010, at 1:46 PM, Kent Bower wrote: On 5/28/2010 10:08 AM, Michael Bayer wrote: Is the pattern that you want to keep re-issuing a savepoint repeatedly using the same name ? Does that have some different usage of resources versus

[sqlalchemy] sqlalchemy caching

2010-05-31 Thread David
Hello, We are having a problem that is driving us crazy. We are in a load- balanced environment, with 2 webservers using Django+SQLAlchemy, and one database server. When a user is using the application, reads and writes work fine so long as the user is on a single webserver. However, when we

Re: [sqlalchemy] Re: For each begin_nested() call, a corresponding rollback() or commit() must be issued.

2010-05-31 Thread Michael Bayer
On May 31, 2010, at 8:24 AM, Kent Bower wrote: Although sqla doesn't allow the user to specify the savepoint name, the same could be accomplished given if support for the following were implemented: Let me ask: sp_a=begin_nested() ... ... sp_b=begin_nested() ... ...

Re: [sqlalchemy] sqlalchemy caching

2010-05-31 Thread Michael Bayer
On May 31, 2010, at 3:43 AM, David wrote: Hello, We are having a problem that is driving us crazy. We are in a load- balanced environment, with 2 webservers using Django+SQLAlchemy, and one database server. When a user is using the application, reads and writes work fine so long as

Re: [sqlalchemy] Re: For each begin_nested() call, a corresponding rollback() or commit() must be issued.

2010-05-31 Thread Kent Bower
On 5/31/2010 9:55 AM, Michael Bayer wrote: On May 31, 2010, at 8:24 AM, Kent Bower wrote: Although sqla doesn't allow the user to specify the savepoint name, the same could be accomplished given if support for the following were implemented: Let me ask: sp_a=begin_nested() ... ...

[sqlalchemy] zope.sqlalchemy with sqla 0.6

2010-05-31 Thread Kent
Laurence Rowe, author of zope.sqlalchemy, suggested we use this mailing list for this discussion. I've installed the savepoint-release branch of zope.sqlalchemy and transaction. I'd like to get this working for sqla 0.6, and so there are a few issues I would like to list here:

Re: [sqlalchemy] Re: For each begin_nested() call, a corresponding rollback() or commit() must be issued.

2010-05-31 Thread Michael Bayer
On May 31, 2010, at 10:28 AM, Kent Bower wrote: that's how the engine-level API works - you get at a Transaction object that you can roll back anywhere in the chain (its up to you to know that the other Transaction objects in the middle are no longer valid).In the ORM we wanted to

[sqlalchemy] SQLAlchemy 0.6.1 released

2010-05-31 Thread Michael Bayer
SQLAlchemy 0.6.1 is now available. This is bugfix release which fixes lots of legacy Oracle issues, i.e. Oracle 8, cx_oracle 4, as well as some ORM glitches. The ORM is also employing an LRU cache to cache the compiler output of the base format insert/update/delete clauses during a flush. In

Re: [sqlalchemy] Re: onupdate Column attribute with joined table inheritance question

2010-05-31 Thread John Fries
btw, using the __before_update__ technique introduced some weird data corruption issues for me when my class had PickleType datamembers. For instance, # Create the Foo class to map foos_table to class Foo(object): def __before_update__(self): self.some_pickle_type self.last_edit_date =

[sqlalchemy] restoring the TINYINT(1) to Boolean

2010-05-31 Thread Mike Bernson
I would like to restore the TINYINT(1) for all tables. I am using reflection to get the tables. The docs talk about passing in override value for the columns that I to want change from the database as parameters to the table object on when reflecting. Since I have no idea what columns are

Re: [sqlalchemy] restoring the TINYINT(1) to Boolean

2010-05-31 Thread Michael Bayer
On May 31, 2010, at 10:01 PM, Mike Bernson wrote: I would like to restore the TINYINT(1) for all tables. I am using reflection to get the tables. The docs talk about passing in override value for the columns that I to want change from the database as parameters to the table object on

Re: [sqlalchemy] restoring the TINYINT(1) to Boolean

2010-05-31 Thread Mike Bernson
will try just setting column.type I have not thought about doing that. Setting the dialect.ischema_names will not work because I only want to get tinyint(1) not all tinyint. Michael Bayer wrote: On May 31, 2010, at 10:01 PM, Mike Bernson wrote: I would like to restore the TINYINT(1) for all

[sqlalchemy] Re: sqlalchemy caching

2010-05-31 Thread David
Thanks for the response, Michael. Sorry, I forgot to mention how we are committing the data. Here is a skinned-down version of the code that returns old data when switching between web servers. engine = sqlalchemy.create_engine(ALCHEMY_DATABASE) Session =