def sort(self, sortlist, name='',
             limit=0, offset=0, style='Python'):
        command = 'select from $1 orderby ' + sortlist
        if limit > 0:
            command += ' limit %d' % limit
        if offset > 0:
            command += ' offset %d' % offset
        if name:
            command += ' giving ' + name
        return tablecommand(command, style, [self])