commit-gnue
[Top][All Lists]
Advanced

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

r5568 - trunk/gnue-common/src/datasources/drivers/DBSIG2


From: reinhard
Subject: r5568 - trunk/gnue-common/src/datasources/drivers/DBSIG2
Date: Mon, 29 Mar 2004 15:41:00 -0600 (CST)

Author: reinhard
Date: 2004-03-29 15:40:59 -0600 (Mon, 29 Mar 2004)
New Revision: 5568

Modified:
   trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
Log:
Added inline documentation.


Modified: trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py      
2004-03-29 21:23:32 UTC (rev 5567)
+++ trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py      
2004-03-29 21:40:59 UTC (rev 5568)
@@ -278,9 +278,20 @@
       raise exc_type, exc_value, exc_traceback
     return cursor
 
+  # ---------------------------------------------------------------------------
   # Execute the given SQL statement and return the result matrix
-  # Statement can be a normal string or a unicode string
+  # ---------------------------------------------------------------------------
+
   def sql (self, statement, parameters = None):
+    """
+    Execute the given SQL statement and return the result matrix.
+
+    @param statement: The SQL statement as either 8-bit or unicode string. Can
+        contain %(name)s style placeholders for parameters.
+    @param parameters: A dictionary with the parameter values. The values of
+        the dictionary can be 8-bit strings, unicode strings, integer or
+        floating point numbers, booleans or mx.DateTime values.
+    """
     result = None
     cursor = self.makecursor (statement, parameters)
     try:
@@ -296,10 +307,21 @@
     else:
       return []
 
+  # ---------------------------------------------------------------------------
   # Execute the given SQL statement that is expected to return a single value
-  # If the query returns nothing, None is returned
-  # Statement can be a normal string or a unicode string
+  # ---------------------------------------------------------------------------
+
   def sql1 (self, statement, parameters = None):
+    """
+    Execute the given SQL statement that is expected to return a single value.
+    If the query returns nothing, None is returned
+
+    @param statement: The SQL statement as either 8-bit or unicode string. Can
+        contain %(name)s style placeholders for parameters.
+    @param parameters: A dictionary with the parameter values. The values of
+        the dictionary can be 8-bit strings, unicode strings, integer or
+        floating point numbers, booleans or mx.DateTime values.
+    """
     cursor = self.makecursor (statement, parameters)
     try:
       result = cursor.fetchone ()





reply via email to

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