[Checkins] SVN: z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/ using
SessionTransactions in Zope wrapper
Andreas Jung
andreas at andreas-jung.com
Tue Mar 20 13:46:46 EDT 2007
Log message for revision 73400:
using SessionTransactions in Zope wrapper
Changed:
U z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/CHANGES.txt
U z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/base.py
-=-
Modified: z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/CHANGES.txt
===================================================================
--- z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/CHANGES.txt 2007-03-20 14:15:38 UTC (rev 73399)
+++ z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/CHANGES.txt 2007-03-20 17:46:45 UTC (rev 73400)
@@ -1,7 +1,12 @@
0.1.3 (unreleased)
- - added getMappers() convinience method
+ - added getMappers() convenience method
+ - the Zope wrapper uses SessionTransactions in order to be able
+ to flush() as session with a transaction in order to read
+ row previously inserted within the same transaction
+
+
0.1.2 (unreleased)
- fixed class hierarchy issues with Postgres wrapper classes
Modified: z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/base.py
===================================================================
--- z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/base.py 2007-03-20 14:15:38 UTC (rev 73399)
+++ z3c.sqlalchemy/trunk/src/z3c/sqlalchemy/base.py 2007-03-20 17:46:45 UTC (rev 73400)
@@ -107,6 +107,7 @@
def __init__(self, session):
self.session = session
+ self.transaction = session.create_transaction()
def abort(self, trans):
pass
@@ -114,8 +115,12 @@
def tpc_begin(self, trans):
pass
+ def abort(self):
+ self.transaction.rollback()
+
def commit(self, trans):
self.session.flush()
+ self.transaction.commit()
def tpc_vote(self, trans):
pass
More information about the Checkins
mailing list