commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r7139 - trunk/gnue-common/src/datasources/drivers/Base


From: reinhard
Subject: [gnue] r7139 - trunk/gnue-common/src/datasources/drivers/Base
Date: Tue, 8 Mar 2005 17:01:40 -0600 (CST)

Author: reinhard
Date: 2005-03-08 17:01:39 -0600 (Tue, 08 Mar 2005)
New Revision: 7139

Modified:
   trunk/gnue-common/src/datasources/drivers/Base/Connection.py
Log:
More cleanup.


Modified: trunk/gnue-common/src/datasources/drivers/Base/Connection.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/Base/Connection.py        
2005-03-08 22:41:24 UTC (rev 7138)
+++ trunk/gnue-common/src/datasources/drivers/Base/Connection.py        
2005-03-08 23:01:39 UTC (rev 7139)
@@ -42,14 +42,17 @@
 
   Descendants I{must} override the following class variables:
 
-  @param defaultBehaviour: standard introspector class for this type of
+  @param defaultBehaviour: standard schema introspector class for this type of
       connection
+  @param defaultCreator: standard schema creator class for this type of
+      connection
   @param supportedDataObjects: dictionary of dataObject classes available for
       this connection type, where the key is the type of the dataObject (can be
       'object' or 'sql')
   """
 
   defaultBehaviour = None
+  defaultCreator   = None
   supportedDataObjects = {}
 
 
@@ -146,7 +149,7 @@
     this driver or None if no creator is available.
     """
 
-    if hasattr (self, 'defaultCreator') and self.defaultCreator:
+    if self.defaultCreator:
       return self.defaultCreator (self)
     else:
       return None
@@ -292,3 +295,12 @@
 
     finally:
       schemaCreator.close ()
+
+
+  # ---------------------------------------------------------------------------
+  # Nice string representation
+  # ---------------------------------------------------------------------------
+
+  def __repr__ (self):
+
+    return "<Connection to %s>" % self.name





reply via email to

[Prev in Thread] Current Thread [Next in Thread]