toJson method

  1. @override
Map<String, Object?> toJson()

Returns a JSON representation of this.

Implementation

@override
Map<String, Object?> toJson() => {
      'runtimeType': 'ColumnDef',
      'name': name.toJson(),
      'data-type': dataType.toJson(),
      'collation': (collation == null
          ? const None().toJson()
          : Option.fromValue(collation)
              .toJson((some) => some.map((e) => e.toJson()).toList())),
      'options': options.map((e) => e.toJson()).toList(),
    };