[sqlalchemy] Re: Session close method

2008-05-27 Thread TP
mit or rollback, then we start seeing the new data in subsequently created sessions. I even tried doing refresh() and expire() calls on the object before closing and re-creating the session, but we still saw the old data. On May 27, 6:04 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On May

[sqlalchemy] Session close method

2008-05-27 Thread TP
>From reading the docs, it sounds like calling .close() on a session implicitly does a .rollback(): "When the Session is closed, it remains attached, but clears all of its contents and releases any ongoing transactional resources, including rolling back any remaining transactional state. The Sess

[sqlalchemy] Re: Custom caching

2008-05-19 Thread TP
Ah, Ok. Well at least I can watch SQL statements go by and do cache invalidation when I see changes to the tables I care about. Really appreciate your help! On May 19, 4:10 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On May 19, 2008, at 3:40 PM, TP wrote: > > > > > Yea

[sqlalchemy] Re: Custom caching

2008-05-19 Thread TP
ld grab the insert and queue it for later rather than have it execute now. Sounds like the ProxyConnection may let me do this. > On May 19, 2008, at 2:15 PM, TP wrote: > > > > > Hi, we have a DB app that uses SQLAlchemy and we'd like to add some > > custom DB caching logic.

[sqlalchemy] Custom caching

2008-05-19 Thread TP
Hi, we have a DB app that uses SQLAlchemy and we'd like to add some custom DB caching logic. Unfortunately, there are no simple choke points that everything flows through where we could add this caching other than SQLAlchemy. We'd like to do things such as say "invalidate the cache if tables X, Y

[sqlalchemy] Re: Problem with non-null fields

2008-05-09 Thread TP
Who knew that marking a field as non-null didn't really make it non- null? Apparently you have to add the following to your my.cnf to tell MySQL your're actually serious about enforcing things: sql-mode='STRICT_TRANS_TABLES' On May 9, 11:30 am, jason kirtland <[EMAIL

[sqlalchemy] Problem with non-null fields

2008-05-09 Thread TP
Hi, I have a model with a field called 'name' that is set to be non- null. When I look at the actual table created in MySQL the field really does say it cannot be null. However, when I try to set it to None and commit() the changes, I get a warning printed /Users/tp/sw/python-exte

[sqlalchemy] Re: Getting the table name that a mapped object came from

2008-04-25 Thread TP
Thanks! On Apr 25, 2:44 pm, "David Bonner" <[EMAIL PROTECTED]> wrote: > On Fri, Apr 25, 2008 at 2:34 PM, TP <[EMAIL PROTECTED]> wrote: > > >  Hi, does anyone know a way to get the underlying table name from the > >  DB for a mapped object? >

[sqlalchemy] Getting the table name that a mapped object came from

2008-04-25 Thread TP
Hi, does anyone know a way to get the underlying table name from the DB for a mapped object? foo = session.Query(Foo).filter_by(a=x) I'd like to now find out what table name foo came from. Thanks! --~--~-~--~~~---~--~~ You received this message because you are