Changeset 32
- Timestamp:
- 03/13/07 19:52:54
- Files:
-
- trunk/geniusql/select.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/geniusql/select.py
r31 r32 544 544 # 'relation' is a single Table object. 545 545 for a in self.attributes: 546 self._copy_column(relation, relation.qname, a)546 self._copy_column(relation, None, a) 547 547 548 548 def _copy_column(self, table, alias, colkey): 549 """Copy the given column from the given table into our result table. 550 551 alias: the name that will be used for the given source table in the 552 FROM clause of the SQL SELECT statement. If None, this signifies 553 that the "SELECT columnlist FROM .." only references a single 554 table, in which case the column list will not use dotted column 555 names. 556 """ 549 557 col = table[colkey] 550 558 newcol = col.copy() … … 554 562 newcol.initial = 1 555 563 556 selname = '%s.%s' % (alias, col.qname) 564 if alias is None: 565 # Single table. 566 selname = col.qname 567 else: 568 selname = '%s.%s' % (alias, col.qname) 557 569 if colkey in self.result: 558 570 # Get the key for the table.
