Compartir a través de


IConventionIndex Interface

Definition

Represents an index on a set of properties.

public interface IConventionIndex : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IIndex
public interface IConventionIndex : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyIndex
type IConventionIndex = interface
    interface IIndex
    interface IAnnotatable
    interface IConventionAnnotatable
type IConventionIndex = interface
    interface IReadOnlyIndex
    interface IReadOnlyAnnotatable
    interface IConventionAnnotatable
Public Interface IConventionIndex
Implements IConventionAnnotatable, IIndex
Public Interface IConventionIndex
Implements IConventionAnnotatable, 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 Model building conventions for more information and examples.

Properties

Builder

Gets the builder that can be used to configure this index.

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)
IsInModel

Indicates whether this object is in a model, i.e. hasn't been removed from one.

(Inherited from IConventionAnnotatable)
IsUnique

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

(Inherited from IReadOnlyIndex)
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, Boolean)

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

(Inherited from IConventionAnnotatable)
AddAnnotations(IEnumerable<IConventionAnnotation>, Boolean)

Adds annotations to an object.

(Inherited from IConventionAnnotatable)
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)
GetConfigurationSource()

Returns the configuration source for this index.

GetIsDescendingConfigurationSource()

Returns the configuration source for IsDescending.

GetIsUniqueConfigurationSource()

Returns the configuration source for IsUnique.

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 annotation with the given name from this object.

(Inherited from IConventionAnnotatable)
RemoveRuntimeAnnotation(String)

Removes the given runtime annotation from this object.

(Inherited from IAnnotatable)
SetAnnotation(String, Object, Boolean)

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

(Inherited from IConventionAnnotatable)
SetIsDescending(IReadOnlyList<Boolean>, Boolean)

Sets the sort order(s) for this index (ascending or descending).

SetIsUnique(Nullable<Boolean>, Boolean)

Sets a value indicating whether the values assigned to the index properties are unique.

SetOrRemoveAnnotation(String, Object, Boolean)

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 IConventionAnnotatable)
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

AddAnnotations(IConventionAnnotatable, IEnumerable<IConventionAnnotation>, Boolean)

Adds annotations to an object.

GetAnnotation(IConventionAnnotatable, String)

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

SetOrRemoveAnnotation(IConventionAnnotatable, String, Object, Boolean)

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.

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.

GetVectorIndexTypeConfigurationSource(IConventionIndex)

Returns the ConfigurationSource for whether the GetVectorIndexType(IReadOnlyIndex).

SetVectorIndexType(IConventionIndex, Nullable<VectorIndexType>, Boolean)

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.

FindSharedObjectRootIndex(IConventionIndex, 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(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.

GetDatabaseNameConfigurationSource(IConventionIndex)

Gets the ConfigurationSource for 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.

GetFilterConfigurationSource(IConventionIndex)

Gets the ConfigurationSource for 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.

GetNameConfigurationSource(IConventionIndex)
Obsolete.

Gets the ConfigurationSource for the name of the index in the database.

SetDatabaseName(IConventionIndex, String, Boolean)

Sets the name of the index in the database.

SetFilter(IConventionIndex, String, Boolean)

Sets the index filter expression.

SetName(IConventionIndex, String, Boolean)
Obsolete.

Sets the name of the index in the database.

GetDataCompression(IReadOnlyIndex, StoreObjectIdentifier)

Returns the data compression that the index uses.

GetDataCompression(IReadOnlyIndex)

Returns the data compression that the index uses.

GetDataCompressionConfigurationSource(IConventionIndex)

Returns the ConfigurationSource for the data compression 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.

GetFillFactorConfigurationSource(IConventionIndex)

Returns the ConfigurationSource for whether the index uses the fill factor.

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.

GetIncludePropertiesConfigurationSource(IConventionIndex)

Returns the ConfigurationSource for the included property names.

GetIsClusteredConfigurationSource(IConventionIndex)

Returns the ConfigurationSource for whether the index is clustered.

GetIsCreatedOnlineConfigurationSource(IConventionIndex)

Returns the ConfigurationSource for whether the index is online.

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.

GetSortInTempDbConfigurationSource(IConventionIndex)

Returns the ConfigurationSource for 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(IConventionIndex, Nullable<DataCompressionType>, Boolean)

Sets a value indicating the data compression the index uses.

SetFillFactor(IConventionIndex, Nullable<Int32>, Boolean)

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

SetIncludeProperties(IConventionIndex, IReadOnlyList<String>, Boolean)

Sets included property names.

SetIsClustered(IConventionIndex, Nullable<Boolean>, Boolean)

Sets a value indicating whether the index is clustered.

SetIsCreatedOnline(IConventionIndex, Nullable<Boolean>, Boolean)

Sets a value indicating whether the index is online.

SetSortInTempDb(IConventionIndex, Nullable<Boolean>, Boolean)

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

Applies to