support for node from having in Select.remove stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 18 Jun 2010 09:40:09 +0200
branchstable
changeset 564 c933fb01dbe2
parent 560 8bb2733fcd88
child 565 d3013b4f134c
support for node from having in Select.remove
ChangeLog
stmts.py
--- a/ChangeLog	Fri Jun 11 15:00:54 2010 +0200
+++ b/ChangeLog	Fri Jun 18 09:40:09 2010 +0200
@@ -1,6 +1,9 @@
 ChangeLog for RQL
 =================
 
+	--
+    * support for node from having in Select.remove
+
 2010-06-11  --  0.26.2
     * totally remove 'IS' operator
 
--- a/stmts.py	Fri Jun 11 15:00:54 2010 +0200
+++ b/stmts.py	Fri Jun 18 09:40:09 2010 +0200
@@ -677,6 +677,9 @@
         term.parent = self
         self.selection.append(term)
 
+    # XXX proprify edition, we should specify if we want:
+    # * undo support
+    # * references handling
     def replace(self, oldnode, newnode):
         assert oldnode is self.where
         self.where = newnode
@@ -696,6 +699,9 @@
             self.remove_sort_term(node)
         elif node in self.groupby:
             self.remove_group_var(node)
+        elif node in self.having:
+            self.having.remove(node)
+        # XXX selection
         else:
             raise Exception('duh XXX')
         node.parent = None