withDriverOptions method

IndexDefinition withDriverOptions(
  1. String driverName,
  2. Map<String, Object?> options
)

Creates a copy with additional driver-specific options.

Implementation

IndexDefinition withDriverOptions(
  String driverName,
  Map<String, Object?> options,
) {
  final newDriverOptions = Map<String, Map<String, Object?>>.from(
    driverOptions,
  );
  newDriverOptions[driverName] = {
    ...?newDriverOptions[driverName],
    ...options,
  };
  return IndexDefinition(
    name: name,
    type: type,
    columns: columns,
    raw: raw,
    driverOptions: newDriverOptions,
  );
}