[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7332 - trunk/gnue-common/src/datasources
From: |
reinhard |
Subject: |
[gnue] r7332 - trunk/gnue-common/src/datasources |
Date: |
Mon, 11 Apr 2005 13:47:48 -0500 (CDT) |
Author: reinhard
Date: 2005-04-11 13:47:47 -0500 (Mon, 11 Apr 2005)
New Revision: 7332
Modified:
trunk/gnue-common/src/datasources/GConditions.py
Log:
Implemented GCexist.asSQL (actually that was quite easy).
Modified: trunk/gnue-common/src/datasources/GConditions.py
===================================================================
--- trunk/gnue-common/src/datasources/GConditions.py 2005-04-09 06:49:42 UTC
(rev 7331)
+++ trunk/gnue-common/src/datasources/GConditions.py 2005-04-11 18:47:47 UTC
(rev 7332)
@@ -1141,21 +1141,20 @@
# ---------------------------------------------------------------------------
- # There's no exist for SQL atm, is it ?
+ # SQL representation
# ---------------------------------------------------------------------------
def asSQL (self, paramDict):
"""
- Raise a NotImplementedError, since we do not support 'exist' elements in
- SQL at the moment.
-
- @raise NotImplementedError: whenever called for this condition element.
+ Return the SQL statement for this condition, using a subselect.
"""
- raise NotImplementedError
+ sql = '%s IN (SELECT %s FROM %s WHERE %s)' % (
+ self.masterlink, self.detaillink, self.table,
+ string.join ([c.asSQL (paramDict) for c in self._children], ' AND '))
+ return sql
-
# =============================================================================
# Return a dictionary of all XML elements available
# =============================================================================
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7332 - trunk/gnue-common/src/datasources,
reinhard <=