共用方式為


RuntimeIndex Class

Definition

Represents an index on a set of properties.

public class RuntimeIndex : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.IIndex
public class RuntimeIndex : Microsoft.EntityFrameworkCore.Infrastructure.RuntimeAnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.IIndex
type RuntimeIndex = class
    inherit AnnotatableBase
    interface IIndex
    interface IReadOnlyIndex
    interface IReadOnlyAnnotatable
    interface IAnnotatable
type RuntimeIndex = class
    inherit RuntimeAnnotatableBase
    interface IIndex
    interface IReadOnlyIndex
    interface IReadOnlyAnnotatable
    interface IAnnotatable
Public Class RuntimeIndex
Inherits AnnotatableBase
Implements IIndex
Public Class RuntimeIndex
Inherits RuntimeAnnotatableBase
Implements IIndex
Inheritance
RuntimeIndex
Inheritance
Implements

Remarks

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

Constructors

RuntimeIndex(IReadOnlyList<RuntimeProperty>, RuntimeEntityType, String, Boolean)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Properties

DebugView

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

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

IsReadOnly

Indicates whether the current object is read-only.

(Inherited from AnnotatableBase)
Item[String]

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

(Inherited from AnnotatableBase)
Item[String]

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

(Inherited from RuntimeAnnotatableBase)
Name

Gets the name of this index.

Properties

Gets the properties that this index is defined on.

Methods

AddAnnotation(String, Annotation)

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

(Inherited from AnnotatableBase)
AddAnnotation(String, Object)

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

(Inherited from AnnotatableBase)
AddAnnotation(String, Object)

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

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

Adds annotations to this object.

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

Adds annotations to this object overriding any existing annotations with the same name.

(Inherited from RuntimeAnnotatableBase)
AddAnnotations(IReadOnlyDictionary<String,Object>)

Adds annotations to this object.

(Inherited from AnnotatableBase)
AddAnnotations(IReadOnlyDictionary<String,Object>)

Adds annotations to this object overriding any existing annotations with the same name.

(Inherited from RuntimeAnnotatableBase)
AddRuntimeAnnotation(String, Annotation)

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

(Inherited from AnnotatableBase)
AddRuntimeAnnotation(String, Annotation)

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

(Inherited from RuntimeAnnotatableBase)
AddRuntimeAnnotation(String, Object)

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

(Inherited from AnnotatableBase)
AddRuntimeAnnotation(String, Object)

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

(Inherited from RuntimeAnnotatableBase)
AddRuntimeAnnotations(IEnumerable<Annotation>)

Adds runtime annotations to this object.

(Inherited from AnnotatableBase)
AddRuntimeAnnotations(IEnumerable<Annotation>)

Adds runtime annotations to this object.

(Inherited from RuntimeAnnotatableBase)
AddRuntimeAnnotations(IReadOnlyDictionary<String,Object>)

Adds runtime annotations to this object.

(Inherited from AnnotatableBase)
AddRuntimeAnnotations(IReadOnlyDictionary<String,Object>)

Adds runtime annotations to this object.

(Inherited from RuntimeAnnotatableBase)
CreateAnnotation(String, Object)

Creates a new annotation.

(Inherited from AnnotatableBase)
CreateAnnotation(String, Object)

Creates a new annotation.

(Inherited from RuntimeAnnotatableBase)
CreateRuntimeAnnotation(String, Object)

Creates a new runtime annotation.

(Inherited from AnnotatableBase)
CreateRuntimeAnnotation(String, Object)

Creates a new runtime annotation.

(Inherited from RuntimeAnnotatableBase)
EnsureMutable()

Throws if the model is read-only.

(Inherited from AnnotatableBase)
EnsureReadOnly()

Throws if the model is not read-only.

(Inherited from AnnotatableBase)
FindAnnotation(String)

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

(Inherited from AnnotatableBase)
FindAnnotation(String)

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

(Inherited from RuntimeAnnotatableBase)
FindRuntimeAnnotation(String)

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

(Inherited from AnnotatableBase)
FindRuntimeAnnotation(String)

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

(Inherited from RuntimeAnnotatableBase)
GetAnnotation(String)

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

(Inherited from AnnotatableBase)
GetAnnotation(String)

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

(Inherited from RuntimeAnnotatableBase)
GetAnnotations()

Gets all annotations on the current object.

(Inherited from AnnotatableBase)
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 AnnotatableBase)
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 RuntimeAnnotatableBase)
GetRuntimeAnnotations()

Gets all runtime annotations on the current object.

(Inherited from AnnotatableBase)
GetRuntimeAnnotations()

Gets all runtime annotations on the current object.

(Inherited from RuntimeAnnotatableBase)
OnAnnotationSet(String, Annotation, Annotation)

Called when an annotation was set or removed.

(Inherited from AnnotatableBase)
RemoveAnnotation(String)

Removes the given annotation from this object.

(Inherited from AnnotatableBase)
RemoveAnnotation(String)

Removes the given annotation from this object.

(Inherited from RuntimeAnnotatableBase)
RemoveRuntimeAnnotation(String)

Removes the given runtime annotation from this object.

(Inherited from AnnotatableBase)
RemoveRuntimeAnnotation(String)

Removes the given runtime annotation from this object.

(Inherited from RuntimeAnnotatableBase)
SetAnnotation(String, Annotation, Annotation)

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

(Inherited from AnnotatableBase)
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 AnnotatableBase)
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 RuntimeAnnotatableBase)
SetRuntimeAnnotation(String, Annotation, Annotation)

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

(Inherited from AnnotatableBase)
SetRuntimeAnnotation(String, Annotation, Annotation)

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

(Inherited from RuntimeAnnotatableBase)
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 AnnotatableBase)
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 RuntimeAnnotatableBase)
ToString()

Returns a string that represents the current object.

Explicit Interface Implementations

IAnnotatable.AddRuntimeAnnotation(String, Object)

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

(Inherited from AnnotatableBase)
IAnnotatable.AddRuntimeAnnotation(String, Object)

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

(Inherited from RuntimeAnnotatableBase)
IAnnotatable.FindRuntimeAnnotation(String)

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

(Inherited from AnnotatableBase)
IAnnotatable.FindRuntimeAnnotation(String)

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

(Inherited from RuntimeAnnotatableBase)
IAnnotatable.GetRuntimeAnnotations()

Gets all the runtime annotations on the current object.

(Inherited from AnnotatableBase)
IAnnotatable.GetRuntimeAnnotations()

Gets all the runtime annotations on the current object.

(Inherited from RuntimeAnnotatableBase)
IAnnotatable.RemoveRuntimeAnnotation(String)

Removes the given runtime annotation from this object.

(Inherited from AnnotatableBase)
IAnnotatable.RemoveRuntimeAnnotation(String)

Removes the given runtime annotation from this object.

(Inherited from RuntimeAnnotatableBase)
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 AnnotatableBase)
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 RuntimeAnnotatableBase)
IIndex.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).

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

IIndex.Properties

Gets the properties that this index is defined on.

IReadOnlyAnnotatable.FindAnnotation(String)

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

(Inherited from AnnotatableBase)
IReadOnlyAnnotatable.FindAnnotation(String)

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

(Inherited from RuntimeAnnotatableBase)
IReadOnlyAnnotatable.GetAnnotations()

Gets all annotations on the current object.

(Inherited from AnnotatableBase)
IReadOnlyAnnotatable.GetAnnotations()

Gets all annotations on the current object.

(Inherited from RuntimeAnnotatableBase)
IReadOnlyAnnotatable.Item[String]

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

(Inherited from AnnotatableBase)
IReadOnlyAnnotatable.Item[String]

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

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

IReadOnlyIndex.IsDescending

Always returns an empty array for RuntimeIndex.

IReadOnlyIndex.IsUnique

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

IReadOnlyIndex.Properties

Gets the properties that this index is defined on.

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.

AnnotationsToDebugString(IAnnotatable, Int32)

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

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.

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.

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.

Applies to