'Return a list of table and view names in the current database.'

def get_table_list(self, cursor):

    cursor.execute("\n                                                SELECT    name,    type    FROM    sqlite_master\n                                                WHERE    type    in    ('table',    'view')    AND    NOT    name='sqlite_sequence'\n                                                ORDER    BY    name")
    return [TableInfo(row[0], row[1][0]) for row in cursor.fetchall()]
