[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/RDB - ZopeConnection.py:1.6 ZopeDBTransactionManager.py:1.4
Albertas Agejevas
alga@codeworks.lt
Mon, 9 Dec 2002 11:07:58 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/RDB
In directory cvs.zope.org:/tmp/cvs-serv31201/lib/python/Zope/App/RDB
Modified Files:
ZopeConnection.py ZopeDBTransactionManager.py
Log Message:
Fixed a bug in transaction management in RDB code.
=== Zope3/lib/python/Zope/App/RDB/ZopeConnection.py 1.5 => 1.6 ===
--- Zope3/lib/python/Zope/App/RDB/ZopeConnection.py:1.5 Mon Aug 12 11:07:30 2002
+++ Zope3/lib/python/Zope/App/RDB/ZopeConnection.py Mon Dec 9 11:07:28 2002
@@ -34,10 +34,6 @@
# The IDBIConnection interface is hereby implemented
return getattr(self.conn, key)
- ############################################################
- # Implementation methods for interface
- # Zope/App/RDB/IZopeConnection.py
-
def cursor(self):
'See Zope.App.RDB.IZopeConnection.IZopeConnection'
return ZopeCursor(self.conn.cursor(), self)
@@ -49,12 +45,17 @@
get_transaction().join(tm)
self._txn_registered = True
- ######################################
- # from: Zope.App.RDB.IDBITypeInfoProvider.IDBITypeInfoProvider
+ def commit(self):
+ 'See Zope.App.RDB.IDBIConnection.IDBIConnection'
+ self._txn_registered = False
+ self.conn.commit()
+
+
+ def rollback(self):
+ 'See Zope.App.RDB.IDBIConnection.IDBIConnection'
+ self._txn_registered = False
+ self.conn.rollback()
def getTypeInfo(self):
'See Zope.App.RDB.IDBITypeInfoProvider.IDBITypeInfoProvider'
return self._type_info
-
- #
- ############################################################
=== Zope3/lib/python/Zope/App/RDB/ZopeDBTransactionManager.py 1.3 => 1.4 ===
--- Zope3/lib/python/Zope/App/RDB/ZopeDBTransactionManager.py:1.3 Wed Jul 24 19:17:04 2002
+++ Zope3/lib/python/Zope/App/RDB/ZopeDBTransactionManager.py Mon Dec 9 11:07:28 2002
@@ -28,9 +28,6 @@
def __init__(self, dbconn):
self._dbconn = dbconn
- # XXX Do any of the Python DB-API implementations support
- # two-phase commit?
-
def prepare(self, txn):
return True
@@ -40,5 +37,8 @@
def commit(self, txn):
self._dbconn.commit()
+ # XXX Do any of the Python DB-API implementations support
+ # two-phase commit?
+
def savepoint(self, txn):
- pass
+ return None