Partager via


IIndex Interface

Definition

Represents an index on a set of properties.

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

Remarks

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.

(Inherited from IReadOnlyIndex)
IsUnique

Gets 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.

Properties

Gets the properties that this index is defined on.

Methods

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.

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)
RemoveRuntimeAnnotation(String)

Removes the given runtime annotation from this object.

(Inherited from IAnnotatable)
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.

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.

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(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.

Relational(IIndex)

Gets the relational database specific metadata for an index.

GetFluentApiCalls(IIndex, IAnnotationCodeGenerator)

Gets the fluent API calls to configure an index.

IsHandledByDataAnnotations(IIndex, IAnnotationCodeGenerator)

Gets value indicating whether this index can be entirely reperesented by a data annotation.

Sqlite(IIndex)

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.

SqlServer(IIndex)

Gets the SQL Server specific metadata for an index.

Applies to