--- a/server/sources/rql2sql.py Thu Oct 15 18:43:04 2009 +0200
+++ b/server/sources/rql2sql.py Thu Oct 15 20:29:21 2009 +0200
@@ -60,7 +60,7 @@
newivar = _new_var(newselect, vref.name)
newselect.selection.append(VariableRef(newivar))
_fill_to_wrap_rel(vref.variable, newselect, towrap, schema)
- elif rschema.is_final():
+ elif rschema.final:
towrap.add( (var, rel) )
def rewrite_unstable_outer_join(select, solutions, unstable, schema):
@@ -616,7 +616,7 @@
return ''
lhs, rhs = relation.get_parts()
rschema = self.schema.rschema(rtype)
- if rschema.is_final():
+ if rschema.final:
if rtype == 'eid' and lhs.variable._q_invariant and \
lhs.variable.stinfo['constnode']:
# special case where this restriction is already generated by
@@ -1096,7 +1096,7 @@
except KeyError:
etype = self._state.solution[var.name]
# XXX this check should be moved in rql.stcheck
- if self.schema.eschema(etype).is_final():
+ if self.schema.eschema(etype).final:
raise BadRQLQuery(var.stmt.root)
table = var.name
sql = '%s.%seid' % (table, SQL_PREFIX)
@@ -1211,7 +1211,7 @@
"""return the table alias used by the given relation"""
if relation in self._state.done:
return relation._q_sqltable
- assert not self.schema.rschema(relation.r_type).is_final(), relation.r_type
+ assert not self.schema.rschema(relation.r_type).final, relation.r_type
rid = 'rel_%s%s' % (relation.r_type, self._state.count)
# relation's table is belonging to the root scope if it is the principal
# table of one of it's variable and if that variable belong's to parent