ColumnOperation.row constructor

ColumnOperation.row(
  1. Map<String, dynamic> transform(
    1. Map<String, dynamic> row
    ), {
  2. List<String>? sql,
})

Applies an arbitrary whole-row rewrite. The returned map replaces the row entirely, so spread the input to keep untouched columns: ColumnOperation.row((row) => {...row, 'v': 2}).

For SQL adapters, sql supplies the equivalent statements verbatim (run in order); without it the operation cannot be expressed as SQL. Ignored by the map-based migration path.

Implementation

factory ColumnOperation.row(
  Map<String, dynamic> Function(Map<String, dynamic> row) transform, {
  List<String>? sql,
}) =>
    RowTransform(transform, sql: sql);