equal
deleted
inserted
replaced
1256 |
1256 |
1257 attribute variables are used either in the selection or for |
1257 attribute variables are used either in the selection or for |
1258 unification (eg X attr1 A, Y attr2 A). In case of selection, |
1258 unification (eg X attr1 A, Y attr2 A). In case of selection, |
1259 nothing to do here. |
1259 nothing to do here. |
1260 """ |
1260 """ |
1261 for var in rhs_vars: |
1261 for vref in rhs_vars: |
|
1262 var = vref.variable |
1262 if var.name in self._varmap: |
1263 if var.name in self._varmap: |
1263 # ensure table is added |
1264 # ensure table is added |
1264 self._var_info(var.variable) |
1265 self._var_info(var) |
1265 principal = var.variable.stinfo.get('principal') |
1266 if isinstance(var, ColumnAlias): |
|
1267 # force sql generation whatever the computed principal |
|
1268 principal = 1 |
|
1269 else: |
|
1270 principal = var.stinfo.get('principal') |
1266 if principal is not None and principal is not relation: |
1271 if principal is not None and principal is not relation: |
1267 # we have to generate unification expression |
1272 # we have to generate unification expression |
1268 lhssql = self._inlined_var_sql(relation.children[0].variable, |
1273 lhssql = self._inlined_var_sql(relation.children[0].variable, |
1269 relation.r_type) |
1274 relation.r_type) |
1270 try: |
1275 try: |