Partager via


IMutableIndex Interface

Definition

Represents an index on a set of properties.

public interface IMutableIndex : Microsoft.EntityFrameworkCore.Metadata.IIndex, Microsoft.EntityFrameworkCore.Metadata.IMutableAnnotatable
public interface IMutableIndex : Microsoft.EntityFrameworkCore.Metadata.IMutableAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyIndex
type IMutableIndex = interface
    interface IIndex
    interface IAnnotatable
    interface IMutableAnnotatable
type IMutableIndex = interface
    interface IReadOnlyIndex
    interface IReadOnlyAnnotatable
    interface IMutableAnnotatable
Public Interface IMutableIndex
Implements IIndex, IMutableAnnotatable
Public Interface IMutableIndex
Implements IMutableAnnotatable, IReadOnlyIndex
Implements

Remarks

This interface is used during model creation and allows the metadata to be modified. Once the model is built, IIndex represents a read-only view of the same metadata.

See Modeling entity types and relationships for more information and examples.

Properties

DeclaringEntityType

Gets the entity type the index is defined on. This may be different from the type that Properties are defined on when the index is defined a derived type in an inheritance hierarchy (since the properties may be defined on a base type).

IsDescending

A set of values indicating whether each corresponding index column has descending sort order.

IsUnique

Gets or sets a value indicating whether the values assigned to the indexed properties are unique.

Item[String]

Gets the value of the annotation with the given name, returning null if it does not exist.

(Inherited from IReadOnlyAnnotatable)
Name

Gets the name of this index.

(Inherited from IReadOnlyIndex)
Properties

Gets the properties that this index is defined on.

Methods

AddAnnotation(String, Object)

Adds an annotation to this object. Throws if an annotation with the specified name already exists.

(Inherited from IMutableAnnotatable)
AddAnnotations(IEnumerable<IAnnotation>)

Adds annotations to an object.

(Inherited from IMutableAnnotatable)
AddRuntimeAnnotation(String, Object)

Adds a runtime annotation to this object. Throws if an annotation with the specified name already exists.

(Inherited from IAnnotatable)
AnnotationsToDebugString(Int32)

Gets the debug string for all annotations declared on the object.

(Inherited from IReadOnlyAnnotatable)
DisplayName()

Gets the friendly display name for the given IReadOnlyIndex, returning its Name if one is defined, or a string representation of its Properties if this is an unnamed index.

(Inherited from IReadOnlyIndex)
FindAnnotation(String)

Gets the annotation with the given name, returning null if it does not exist.

(Inherited from IReadOnlyAnnotatable)
FindRuntimeAnnotation(String)

Gets the runtime annotation with the given name, returning null if it does not exist.

(Inherited from IAnnotatable)
FindRuntimeAnnotationValue(String)

Gets the value of the runtime annotation with the given name, returning null if it does not exist.

(Inherited from IAnnotatable)
GetAnnotation(String)

Gets the annotation with the given name, throwing if it does not exist.

(Inherited from IReadOnlyAnnotatable)
GetAnnotations()

Gets all annotations on the current object.

(Inherited from IReadOnlyAnnotatable)
GetNullableValueFactory<TKey>()

Gets a factory for key values based on the index key values taken from various forms of entity data.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

(Inherited from IIndex)
GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

Gets the value of the runtime annotation with the given name, adding it if one does not exist.

(Inherited from IAnnotatable)
GetRuntimeAnnotations()

Gets all the runtime annotations on the current object.

(Inherited from IAnnotatable)
RemoveAnnotation(String)

Removes the given annotation from this object.

(Inherited from IMutableAnnotatable)
RemoveRuntimeAnnotation(String)

Removes the given runtime annotation from this object.

(Inherited from IAnnotatable)
SetAnnotation(String, Object)

Sets the annotation stored under the given key. Overwrites the existing annotation if an annotation with the specified name already exists.

(Inherited from IMutableAnnotatable)
SetOrRemoveAnnotation(String, Object)

Sets the annotation stored under the given name. Overwrites the existing annotation if an annotation with the specified name already exists. Removes the existing annotation if null is supplied.

(Inherited from IMutableAnnotatable)
SetRuntimeAnnotation(String, Object)

Sets the runtime annotation stored under the given key. Overwrites the existing annotation if an annotation with the specified name already exists.

(Inherited from IAnnotatable)
ToDebugString(MetadataDebugStringOptions, Int32)

Creates a human-readable representation of the given metadata.

Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.

(Inherited from IReadOnlyIndex)

Extension Methods

GetVectorIndexType(IReadOnlyIndex)

Returns the vector index type to use, such as "flat", "diskANN", or "quantizedFlat". See Vector Search in Azure Cosmos DB for NoSQL for more information.

SetVectorIndexType(IMutableIndex, Nullable<VectorIndexType>)

Sets the vector index type to use, such as "flat", "diskANN", or "quantizedFlat". See Vector Search in Azure Cosmos DB for NoSQL for more information.

GetNullableValueFactory<TKey>(IIndex)

Gets a factory for key values based on the index key values taken from various forms of entity data.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

ToDebugString(IIndex, MetadataDebugStringOptions, Int32)

Creates a human-readable representation of the given metadata.

Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.

AnnotationsToDebugString(IAnnotatable, Int32)

Gets the debug string for all annotations declared on the object.

GetAnnotation(IAnnotatable, String)

Gets the annotation with the given name, throwing if it does not exist.

AddAnnotations(IMutableAnnotatable, IEnumerable<IAnnotation>)

Adds annotations to an object.

GetAnnotation(IMutableAnnotatable, String)

Gets the annotation with the given name, throwing if it does not exist.

GetOrAddAnnotation(IMutableAnnotatable, String, String)

Gets the existing annotation with a given key, or adds a new annotation if one does not exist.

SetOrRemoveAnnotation(IMutableAnnotatable, String, Object)

Sets the annotation stored under the given name. Overwrites the existing annotation if an annotation with the specified name already exists. Removes the existing annotation if null is supplied.

FindSharedObjectRootIndex(IIndex, StoreObjectIdentifier)

Finds the first IConventionIndex that is mapped to the same index in a shared table-like object.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

FindSharedObjectRootIndex(IMutableIndex, StoreObjectIdentifier)

Finds the first IMutableIndex that is mapped to the same index in a shared table-like object.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

FindSharedObjectRootIndex(IReadOnlyIndex, StoreObjectIdentifier)

Finds the first IIndex that is mapped to the same index in a shared table-like object.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

GetDatabaseName(IIndex, StoreObjectIdentifier)

Returns the name of the index in the database.

GetDatabaseName(IIndex)

Returns the name of the index in the database.

GetDatabaseName(IReadOnlyIndex, StoreObjectIdentifier)

Returns the name of the index in the database.

GetDatabaseName(IReadOnlyIndex)

Returns the name of the index in the database.

GetDefaultDatabaseName(IIndex, StoreObjectIdentifier)

Returns the default name that would be used for this index.

GetDefaultDatabaseName(IIndex)

Returns the default name that would be used for this index.

GetDefaultDatabaseName(IReadOnlyIndex, StoreObjectIdentifier)

Returns the default name that would be used for this index.

GetDefaultDatabaseName(IReadOnlyIndex)

Returns the default name that would be used for this index.

GetDefaultName(IIndex)
Obsolete.

Returns the default name that would be used for this index.

GetFilter(IIndex, StoreObjectIdentifier)

Returns the index filter expression.

GetFilter(IIndex)

Returns the index filter expression.

GetFilter(IReadOnlyIndex, StoreObjectIdentifier)

Returns the index filter expression.

GetFilter(IReadOnlyIndex)

Returns the index filter expression.

GetMappedTableIndexes(IIndex)

Gets the table indexes to which the index is mapped.

GetName(IIndex)
Obsolete.

Returns the name of the index in the database.

SetDatabaseName(IMutableIndex, String)

Sets the name of the index in the database.

SetFilter(IMutableIndex, String)

Sets the index filter expression.

SetName(IMutableIndex, String)
Obsolete.

Sets the name of the index in the database.

Relational(IIndex)

Gets the relational database specific metadata for an index.

Relational(IMutableIndex)

Gets the relational database specific metadata for an index.

Sqlite(IIndex)

Gets the SQLite specific metadata for an index.

Sqlite(IMutableIndex)

Gets the SQLite specific metadata for an index.

GetDataCompression(IReadOnlyIndex, StoreObjectIdentifier)

Returns the data compression that the index uses.

GetDataCompression(IReadOnlyIndex)

Returns the data compression that the index uses.

GetFillFactor(IIndex)

Returns a value indicating whether the index uses the fill factor.

GetFillFactor(IReadOnlyIndex, StoreObjectIdentifier)

Returns the fill factor that the index uses.

GetFillFactor(IReadOnlyIndex)

Returns the fill factor that the index uses.

GetIncludeProperties(IIndex)

Returns included property names, or null if they have not been specified.

GetIncludeProperties(IReadOnlyIndex, StoreObjectIdentifier)

Returns included property names, or null if they have not been specified.

GetIncludeProperties(IReadOnlyIndex)

Returns included property names, or null if they have not been specified.

GetSortInTempDb(IReadOnlyIndex, StoreObjectIdentifier)

Returns a value indicating whether the index is sorted in tempdb.

GetSortInTempDb(IReadOnlyIndex)

Returns a value indicating whether the index is sorted in tempdb.

IsClustered(IIndex, StoreObjectIdentifier)

Returns a value indicating whether the index is clustered.

IsClustered(IIndex)

Returns a value indicating whether the index is clustered.

IsClustered(IReadOnlyIndex, StoreObjectIdentifier)

Returns a value indicating whether the index is clustered.

IsClustered(IReadOnlyIndex)

Returns a value indicating whether the index is clustered.

IsCreatedOnline(IIndex)

Returns a value indicating whether the index is online.

IsCreatedOnline(IReadOnlyIndex, StoreObjectIdentifier)

Returns a value indicating whether the index is online.

IsCreatedOnline(IReadOnlyIndex)

Returns a value indicating whether the index is online.

SetDataCompression(IMutableIndex, Nullable<DataCompressionType>)

Sets a value indicating the data compression the index uses.

SetFillFactor(IMutableIndex, Nullable<Int32>)

Sets a value indicating whether the index uses the fill factor.

SetIncludeProperties(IMutableIndex, IReadOnlyList<String>)

Sets included property names.

SetIsClustered(IMutableIndex, Nullable<Boolean>)

Sets a value indicating whether the index is clustered.

SetIsCreatedOnline(IMutableIndex, Nullable<Boolean>)

Sets a value indicating whether the index is online.

SetSortInTempDb(IMutableIndex, Nullable<Boolean>)

Sets a value indicating whether the index is sorted in tempdb.

SqlServer(IIndex)

Gets the SQL Server specific metadata for an index.

SqlServer(IMutableIndex)

Gets the SQL Server specific metadata for an index.

Applies to