getColumnNames static method

Future<List<String>> getColumnNames(
  1. DatabaseExecutor db,
  2. String tableName
)

Get table (except sqlite_master) column names

Implementation

static Future<List<String>> getColumnNames(DatabaseExecutor db, String tableName) async {
  List<String> result = [];
  await iterateAllTables(db, (name, columns) {
    if (name == tableName) {
      result = columns; // it's ok, dart pass the ptr. also clear & addAll or setAll .
      return true;
    }
    return false;
  });
  return result;
}