Skip to content
Snippets Groups Projects
Commit 094a19c24751 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

cleanup

parent 16b3e87164d6
No related branches found
No related tags found
No related merge requests found
ChangeLog for RQL
=================
--
* Union.locate_subquery now return a 2-uple (select subquery, column index in the subquery)
* new subquery_selection_index method on Union
* new root_selection_index method on VariableRef
2009-08-18 -- 0.22.2
* fixes to compile with different versions of gecode
2009-05-04 -- 0.22.0
* consider subqueries in variables graph
......
......@@ -115,7 +115,6 @@
def check_references(self):
"""test function"""
defined = self.defined_vars.copy()
try:
defined = self.aliases.copy()
except AttributeError:
......@@ -119,8 +118,8 @@
try:
defined = self.aliases.copy()
except AttributeError:
defined = self.defined_vars
defined = self.defined_vars.copy()
else:
defined.update(self.defined_vars)
for subq in self.with_:
subq.query.check_references()
......@@ -123,8 +122,9 @@
else:
defined.update(self.defined_vars)
for subq in self.with_:
subq.query.check_references()
varrefs = [vref for vref in self.get_nodes(nodes.VariableRef) if vref.stmt is self]
varrefs = [vref for vref in self.get_nodes(nodes.VariableRef)
if vref.stmt is self]
try:
_check_references(defined, varrefs)
except:
......@@ -140,11 +140,6 @@
schema = None # ISchema
annotated = False # set by the annotator
# def __init__(self):
# Node.__init__(self)
# # syntax tree meta-information
# self.stinfo = {}
# navigation helper methods #############################################
@property
......@@ -284,6 +279,7 @@
return alias.query._locate_subquery(alias.colnum, etype,
kwargs)
except AttributeError:
# term has no 'name' attribute
pass
for i, solution in enumerate(select.solutions):
if term.get_type(solution, kwargs) == etype:
......@@ -300,7 +296,8 @@
self._subq_cache = {}
except KeyError:
pass
self._subq_cache[(col, etype)] = self._locate_subquery(col, etype, kwargs)
self._subq_cache[(col, etype)] = self._locate_subquery(col, etype,
kwargs)
return self._subq_cache[(col, etype)]
def subquery_selection_index(self, subselect, col):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment