[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces - rdb.py:1.1.2.3

Guido van Rossum guido@python.org
Mon, 23 Dec 2002 18:01:15 -0500


Update of /cvs-repository/Zope3/src/zope/app/interfaces
In directory cvs.zope.org:/tmp/cvs-serv27819

Modified Files:
      Tag: NameGeddon-branch
	rdb.py 
Log Message:
Reordered.


=== Zope3/src/zope/app/interfaces/rdb.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/interfaces/rdb.py:1.1.2.2	Mon Dec 23 15:49:36 2002
+++ Zope3/src/zope/app/interfaces/rdb.py	Mon Dec 23 18:01:14 2002
@@ -11,11 +11,13 @@
 # FOR A PARTICULAR PURPOSE.
 # 
 ##############################################################################
-"""
+"""Relational Database Adapter interfaces.
 
 $Id$
 """
 from zope.interface import Interface
+from zope.interface import Attribute
+
 
 class IDBITypeInfoProvider(Interface):
     """This object can get the Type Info for a particular DBI
@@ -25,11 +27,6 @@
         """Return an IDBITypeInfo object."""
 
 
-"""
-$Id$
-"""
-from zope.interface import Interface, Attribute
-
 class IDBITypeInfo(Interface):
     """Database adapter specific information"""
     
@@ -64,95 +61,7 @@
         """Return a converter function for field type matching key"""
 
 
-"""
-$Id$
-"""
-
-
-class IZopeCursor(IDBICursor):
-    """An ICursor that integrates with Zope's transactions"""
-
-    def execute(operation, parameters=None):
-        """Executes an operation, registering the underlying connection with
-        the transaction system.
-
-        See ICursor for more detailed execute information.
-        """
-
-    def executemany(operation, seq_of_parameters=None):
-        """Executes an operation, registering the underlying connection with
-        the transaction system.
-
-        See ICursor for more detailed executemany information.
-        """
-        
-
-
-"""
-$Id$
-"""
-
-
-
-class IZopeDatabaseAdapter(IDBITypeInfo):
-    """Interface for persistent object that returns
-    volatile IZopeConnections.
-
-    This object is internal to the connection service."""
-
-    def setDSN(dsn):
-        """Set the DSN for the Adapter instance"""
-
-    def getDSN():
-        """Get the DSN of the Adapter instance"""
-
-    def connect():
-        """Connect to the specified database."""
-
-    def disconnect():
-        """Disconnect from the database."""
-
-    def isConnected():
-        """Check whether the Zope Connection is actually connected to the
-        database."""
-
-    def __call__():
-        """Return an IZopeConnection object"""
-
-
-
-"""
-$Id$
-"""
-
-
-
-
-class IZopeConnection(IDBIConnection, IDBITypeInfoProvider):
-
-    # XXX What does the next paragraph mean?
-    
-    # An implementation of this object will be exposed to the
-    # user. Therefore the Zope connection represents a connection in
-    # the Zope sense, meaning that the object might not be actually
-    # connected to a database.
-
-    def cursor():
-        """Return an IZopeCursor object."""
-        
-    def registerForTxn():
-        """Join the current transaction.
-
-        This method should only be inovoked by the Zope/DB transaction
-        manager.
-        """
-
-
-"""
-$Id$
-"""
-
-from zope.interface import Interface, Attribute
+arraysize = 1 # default constant, symbolic
 
 class ICursor(Interface):
     """DB API ICursor interface"""
@@ -265,13 +174,6 @@
         """
         
 
-
-"""
-$Id$
-"""
-from zope.interface import Interface, Attribute
-
-
 class IResultSet(Interface):
     """Holds results, and allows iteration."""
 
@@ -282,17 +184,6 @@
         """Return a brain row for index."""
 
 
-
-
-
-    
-
-
-"""
-$Id$
-"""
-
-
 class DatabaseException(Exception):
     """Generic Database Error"""
 
@@ -303,14 +194,6 @@
         return self.message
 
 
-
-"""
-$Id$
-"""
-from zope.interface import Interface, Attribute
-
-arraysize = 1 # default constant, symbolic
-
 class IDBICursor(Interface):
     """DB API ICursor interface"""
 
@@ -422,11 +305,6 @@
         """
 
 
-"""
-$Id$
-"""
-from zope.interface import Interface, Attribute
-
 class IConnectionService(Interface):
 
     def getConnection(name):
@@ -439,11 +317,6 @@
         """Returns the connections available from this connection service."""
 
 
-"""
-$Id$
-"""
-from zope.interface import Interface
-
 class IDBIConnection(Interface):
     """A DB-API based Interface """
     
@@ -477,18 +350,6 @@
         trying to use the connection.  """
 
 
-
-
-
-
-
-
-
-"""
-$Id$
-"""
-from zope.interface import Interface, Attribute
-
 class ISQLCommand(Interface):
     """Static SQL commands."""
     
@@ -501,11 +362,67 @@
     def __call__():
         """Execute an sql query and return a result object if appropriate"""
 
+
+
+class IZopeDatabaseAdapter(IDBITypeInfo):
+    """Interface for persistent object that returns
+    volatile IZopeConnections.
+
+    This object is internal to the connection service."""
+
+    def setDSN(dsn):
+        """Set the DSN for the Adapter instance"""
+
+    def getDSN():
+        """Get the DSN of the Adapter instance"""
+
+    def connect():
+        """Connect to the specified database."""
+
+    def disconnect():
+        """Disconnect from the database."""
+
+    def isConnected():
+        """Check whether the Zope Connection is actually connected to the
+        database."""
+
+    def __call__():
+        """Return an IZopeConnection object"""
+
+
+class IZopeConnection(IDBIConnection, IDBITypeInfoProvider):
+
+    # XXX What does the next paragraph mean?
+    
+    # An implementation of this object will be exposed to the
+    # user. Therefore the Zope connection represents a connection in
+    # the Zope sense, meaning that the object might not be actually
+    # connected to a database.
+
+    def cursor():
+        """Return an IZopeCursor object."""
         
-__doc__ = ISQLCommand.__doc__
+    def registerForTxn():
+        """Join the current transaction.
+
+        This method should only be inovoked by the Zope/DB transaction
+        manager.
+        """
 
 
+class IZopeCursor(IDBICursor):
+    """An ICursor that integrates with Zope's transactions"""
 
+    def execute(operation, parameters=None):
+        """Executes an operation, registering the underlying connection with
+        the transaction system.
 
+        See ICursor for more detailed execute information.
+        """
 
+    def executemany(operation, seq_of_parameters=None):
+        """Executes an operation, registering the underlying connection with
+        the transaction system.
 
+        See ICursor for more detailed executemany information.
+        """