6 May
2008
6 May
'08
11:08 a.m.
Hey, Laurence Rowe wrote:
See pypi or the readme for details, but briefly usage is something like:
>>> engine = create_engine('sqlite:///') >>> Session = scoped_session(sessionmaker( ... bind=engine, transactional=True, autoflush=True, ... extension=ZopeTransactionExtension())) >>> session = Session() >>> session.save(User(name='bob')) >>> transaction.commit()
One thing I understood from Christian Theune is that with scoped sessions, explicit session.save() is not always necessary. Since I see it being used here, could you perhaps comment on this? This is great news, also for megrok.rdb, which we started to develop at the Grokkerdam sprint. Regards, Martijn