addColumnsOfType method

Future<void> addColumnsOfType({
  1. required String table,
  2. required Map<String, DataType> newColumns,
  3. List<String>? namespace,
})

Implementation

Future<void> addColumnsOfType({required String table, required Map<String, DataType> newColumns, List<String>? namespace}) async {
  await _invoke("add_columns", {
    "table": table,
    "columns": newColumns.entries
        .map((entry) => {"name": entry.key, "value_sql": null, "data_type": _toolkitDataTypeJson(entry.value)})
        .toList(growable: false),
    "namespace": namespace,
  });
}