'Changes the alias prefix to the next letter in the alphabet and
relabels all the aliases. Even tables that previously had no alias will
get an alias after this call (it\'s mostly used for nested queries and
the outer query will already be using the non-aliased table name).
Subclasses who create their own prefix should override this method to
produce a similar result (a new prefix and relabelled aliases).
The \'exceptions\' parameter is a container that holds alias names which
should not be changed.'

def bump_prefix(self, exceptions=()):

    current = ord(self.alias_prefix)
    assert (current < ord('Z'))
    prefix = chr((current + 1))
    self.alias_prefix = prefix
    change_map = SortedDict()
    for (pos, alias) in enumerate(self.tables):
        if (alias in exceptions):
            continue
        new_alias = ('%s%d' % (prefix, pos))
        change_map[alias] = new_alias
        self.tables[pos] = new_alias
    self.change_aliases(change_map)
