ColumnType.fromJson constructor

ColumnType.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory ColumnType.fromJson(Map<String, Object?> json) {
  final typeName = ColumnTypeName.values.byName(json['name'] as String);
  return ColumnType(
    typeName,
    length: json['length'] as int?,
    precision: json['precision'] as int?,
    scale: json['scale'] as int?,
    customName: json['customName'] as String?,
    timezoneAware: json['timezoneAware'] as bool? ?? false,
  );
}