[Zodb-checkins] CVS: ZODB3/ZODB - Connection.py:1.87
Jeremy Hylton
jeremy@zope.com
Tue, 4 Mar 2003 16:00:24 -0500
Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv7858
Modified Files:
Connection.py
Log Message:
Add isReadOnly() method to Connection.
=== ZODB3/ZODB/Connection.py 1.86 => 1.87 ===
--- ZODB3/ZODB/Connection.py:1.86 Thu Feb 6 15:32:18 2003
+++ ZODB3/ZODB/Connection.py Tue Mar 4 16:00:23 2003
@@ -91,6 +91,8 @@
def setLocalTransaction(self):
"""Use a transaction bound to the connection rather than the thread"""
if self._transaction is None:
+ # XXX The connection may already be registered with a
+ # transaction. I guess we should abort that transaction.
self._transaction = Transaction()
return self._transaction
@@ -473,6 +475,9 @@
def db(self): return self._db
def getVersion(self): return self._version
+
+ def isReadOnly(self):
+ return self._storage.isReadOnly()
def invalidate(self, oid):
"""Invalidate a particular oid