commit-gnue
[Top][All Lists]
Advanced

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

[gnue] r7796 - trunk/gnue-common/src/datasources


From: reinhard
Subject: [gnue] r7796 - trunk/gnue-common/src/datasources
Date: Sun, 7 Aug 2005 14:09:50 -0500 (CDT)

Author: reinhard
Date: 2005-08-07 14:09:50 -0500 (Sun, 07 Aug 2005)
New Revision: 7796

Modified:
   trunk/gnue-common/src/datasources/GConditions.py
Log:
Don't generate a parameter for NULL as some backends don't like it.


Modified: trunk/gnue-common/src/datasources/GConditions.py
===================================================================
--- trunk/gnue-common/src/datasources/GConditions.py    2005-08-07 18:44:59 UTC 
(rev 7795)
+++ trunk/gnue-common/src/datasources/GConditions.py    2005-08-07 19:09:50 UTC 
(rev 7796)
@@ -426,12 +426,15 @@
     @return: placeholder for the constant, i.e. '%(p0)s'
     """
 
-    pKey = "p%d" % len (paramDict)
-    paramDict [pKey] = self.value
+    if self.value is None:
+      # Some backends don't like NULL to be a parameter
+      return u'NULL'
+    else:
+      pKey = "p%d" % len (paramDict)
+      paramDict [pKey] = self.value
+      return u'%%(%s)s' % pKey
 
-    return u'%%(%s)s' % pKey
 
-
   # ---------------------------------------------------------------------------
   # Create a native python type for the constant value
   # ---------------------------------------------------------------------------





reply via email to

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