@@ -36,7 +36,7 @@ class QueryExpression:
36
36
"""
37
37
_restriction = None
38
38
_restriction_attributes = None
39
- _left = [] # True for left joins, False for inner joins
39
+ _left = [] # list of booleans True for left joins, False for inner joins
40
40
_original_heading = None # heading before projections
41
41
42
42
# subclasses or instantiators must provide values
@@ -248,7 +248,7 @@ def join(self, other, semantic_check=True, left=False):
248
248
if semantic_check :
249
249
assert_join_compatibility (self , other )
250
250
join_attributes = set (n for n in self .heading .names if n in other .heading .names )
251
- # needs subquery if FROM class has common attributes with the other's FROM clause
251
+ # needs subquery if self's FROM clause has common attributes with other's FROM clause
252
252
need_subquery1 = need_subquery2 = bool (
253
253
(set (self .original_heading .names ) & set (other .original_heading .names ))
254
254
- join_attributes )
@@ -287,7 +287,7 @@ def proj(self, *attributes, **named_attributes):
287
287
self.proj(...) or self.proj(Ellipsis) -- include all attributes (return self)
288
288
self.proj() -- include only primary key
289
289
self.proj('attr1', 'attr2') -- include primary key and attributes attr1 and attr2
290
- self.proj(..., '-attr1', '-attr2') -- include attributes except attr1 and attr2
290
+ self.proj(..., '-attr1', '-attr2') -- include all attributes except attr1 and attr2
291
291
self.proj(name1='attr1') -- include primary key and 'attr1' renamed as name1
292
292
self.proj('attr1', dup='(attr1)') -- include primary key and attribute attr1 twice, with the duplicate 'dup'
293
293
self.proj(k='abs(attr1)') adds the new attribute k with the value computed as an expression (SQL syntax)
0 commit comments