Thanks Michael.

I'll also study carefully the other thread ("can expire_on_commit be
made...") it has interesting insights !

Franck



On Thu, Jan 13, 2011 at 4:26 PM, Michael Bayer <[email protected]>wrote:

> You'd implement the "expire" yourself using
> SessionExtension.after_commit().
>
> On Jan 13, 2011, at 9:18 AM, Franck wrote:
>
> Dear all,
>
> I've decided to plug SQLAlchemy to my web framework in order to let
> SQLAlchemy handle the framework's user sessions.
> Theses sessions require a lot of SELECT and UPDATE all the time.
>
> Therefore, I'd like to toggle expire_on_commit and (possibly) autocommit *for
> the SESSIONS table only.*
> The strategy for other tables should not change.
>
> Is it possible ?
>
> Here is how I define my scoped_session for the application :
>
> orm = scoped_session(sessionmaker(bind=engine))
>
> Here's an example of use :
>
> now = datetime.datetime.now()
> s = Session.get(key)
> s.atime = now
> orm.commit()
>
> Thanks a lot !
> Franck
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<sqlalchemy%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to