[Zodb-checkins] CVS: Zope3/src/zodb - interfaces.py:1.10
Jeremy Hylton
jeremy@zope.com
Thu, 27 Feb 2003 15:11:47 -0500
Update of /cvs-repository/Zope3/src/zodb
In directory cvs.zope.org:/tmp/cvs-serv8912
Modified Files:
interfaces.py
Log Message:
Add some preliminary interfaces for database.
=== Zope3/src/zodb/interfaces.py 1.9 => 1.10 ===
--- Zope3/src/zodb/interfaces.py:1.9 Tue Feb 11 10:59:27 2003
+++ Zope3/src/zodb/interfaces.py Thu Feb 27 15:11:47 2003
@@ -220,6 +220,30 @@
o A reference to an object in a different database connection.
"""
+class IAppDatabase(Interface):
+ """Interface exported by database to applications."""
+
+ def open(version="", transaction=None, temporary=False, force=False,
+ waitflag=True):
+ # XXX Most of these arguments should eventually go away
+ """Open a new database connection."""
+
+ def abortVersion(version):
+ """Abort the locked database version named version."""
+
+ def commitVersion(source, dest=""):
+ """Commit changes from locked database version source to dest.
+
+ The default value of dest means commit the changes to the
+ default version.
+ """
+
+ def pack(time):
+ """Pack database to time."""
+
+ def undo(txnid):
+ """Undo changes caused by transaction txnid."""
+
class IAppConnection(Interface):
"""Interface exported by database connection to applications."""
@@ -231,6 +255,25 @@
If there is a current transaction, it will be aborted.
"""
+
+class IDatabase(Interface):
+ """Interface between the database and its connections."""
+
+ # XXX This interface needs to be redesigned, so I'm not going to
+ # bother documenting the current interface.
+
+ def begin_invalidation():
+ pass
+
+ def invalidate(oid, conn):
+ pass
+
+ def finish_invalidation():
+ pass
+
+ def _closeConnection():
+ pass
+
class IConnection(Interface):
"""Interface required of Connection by ZODB DB.