copyWithPrefix method

SerializableModelIndexDefinition copyWithPrefix(
  1. String prefix
)

Copy the index with a new name that is prefixed with prefix.

Implementation

SerializableModelIndexDefinition copyWithPrefix(String prefix) {
  return SerializableModelIndexDefinition(
    name: '${prefix}_$name',
    type: type,
    unique: unique,
    fields: fields,
    vectorDistanceFunction: vectorDistanceFunction,
    parameters: parameters,
  );
}