IndexDefinition.fromJson constructor

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

Implementation

factory IndexDefinition.fromJson(Map<String, Object?> json) =>
    IndexDefinition(
      name: json['name'] as String,
      type: IndexType.values.byName(json['type'] as String),
      columns: (json['columns'] as List).cast<String>(),
      raw: json['raw'] == true,
      driverOptions:
          (json['driverOptions'] as Map?)?.map(
            (key, value) => MapEntry(
              key as String,
              (value as Map).cast<String, Object?>(),
            ),
          ) ??
          const {},
    );