Django

Code

Changeset 7439

Show
Ignore:
Timestamp:
04/22/08 13:09:55 (4 months ago)
Author:
mtredinnick
Message:

queryset-refactor: Don't use the "AS" keyword in the FROM-clause. Fixed #7055.
Patch from Ian Kelly.

This keyword is optional in SQL, but not permitted by Oracle. If we ever need
to support a backend that requires this keyword at some later date, we can make
it a connection.feature option, but that's overkill for now.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/queryset-refactor/django/db/models/sql/query.py

    r7429 r7439  
    421421                continue 
    422422            name, alias, join_type, lhs, lhs_col, col, nullable = self.alias_map[alias] 
    423             alias_str = (alias != name and ' AS %s' % alias or '') 
     423            alias_str = (alias != name and ' %s' % alias or '') 
    424424            if join_type and not first: 
    425425                result.append('%s %s%s ON (%s.%s = %s.%s)' 
  • django/branches/queryset-refactor/django/db/models/sql/subqueries.py

    r7437 r7439  
    362362    def get_from_clause(self): 
    363363        result, params = self._query.as_sql() 
    364         return ['(%s) AS A1' % result], params 
     364        return ['(%s) A1' % result], params 
    365365 
    366366    def get_ordering(self):