Changeset 7288
- Timestamp:
- 03/18/08 08:53:22 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/queryset-refactor/django/db/models/sql/query.py
r7287 r7288 653 653 self.alias_map[alias] = tuple(data) 654 654 655 def bump_prefix(self ):655 def bump_prefix(self, exceptions=()): 656 656 """ 657 657 Changes the alias prefix to the next letter in the alphabet and … … 662 662 Subclasses who create their own prefix should override this method to 663 663 produce a similar result (a new prefix and relabelled aliases). 664 665 The 'exceptions' parameter is a container that holds alias names which 666 should not be changed. 664 667 """ 665 668 assert ord(self.alias_prefix) < ord('Z') … … 668 671 prefix = self.alias_prefix 669 672 for pos, alias in enumerate(self.tables): 673 if alias in exceptions: 674 continue 670 675 new_alias = '%s%d' % (prefix, pos) 671 676 change_map[alias] = new_alias
