def get_columns(self, database, table, names_only=True):
    cursor = self.connection.cursor()
    cursor.execute("PRAGMA table_info(%s)" % table)
    self.connection.commit()
    if names_only:
      columns = [row[1] for row in cursor.fetchall()]
    else:
      columns = [dict(name=row[1], type=row[2], comment='') for row in cursor.fetchall()]
    return columns
dataset/ETHPy150Open cloudera/hue/desktop/libs/librdbms/src/librdbms/server/sqlite_lib.py/SQLiteClient.get_columns/original