Language

RelationalJsonIndex Class

Definition

Describes a relational table index defined over one or more properties contained within a JSON-mapped column. Holds the JSON elements targeted by the index together with the complex-collection indices traversed to reach each indexed property.

[System.Runtime.CompilerServices.Nullable(0)]
public sealed class RelationalJsonIndex : IEquatable<Microsoft.EntityFrameworkCore.Metadata.RelationalJsonIndex>
[<System.Runtime.CompilerServices.Nullable(0)>]
type RelationalJsonIndex = class
    interface IEquatable<RelationalJsonIndex>
Public NotInheritable Class RelationalJsonIndex
Implements IEquatable(Of RelationalJsonIndex)
Inheritance
RelationalJsonIndex
Attributes
Implements

Remarks

The Elements list contains one IRelationalJsonElement per indexed property, identifying the leaf JSON element within the JSON-mapped column.

The CollectionIndices list runs parallel to Elements and, for each indexed property, contains an entry whose values resolve the indexers of the complex-collection segments on the path to the property: a null entry indicates the indexer is unspecified (all elements), and a fixed value indicates a specific element. A null top-level entry indicates the property is not reached through any complex collection.

The IsDescending list, when present, runs parallel to Elements and indicates the sort order requested for each indexed JSON element. Sort order for a JSON index can only be represented per element (since all elements may share the same JSON container column, which is exposed as a single, deduplicated operation column), so it is carried here rather than on the containing CreateIndexOperation/ITableIndex, whose column-level IsDescending is null for JSON indexes.

Constructors

Name Description
RelationalJsonIndex(IReadOnlyList<IRelationalJsonElement>, IReadOnlyList<IReadOnlyList<Nullable<Int32>>>, IReadOnlyList<Boolean>)

Creates a new RelationalJsonIndex instance.

Properties

Name Description
CollectionIndices

Gets the complex-collection indices traversed to reach each indexed property.

Elements

Gets the JSON elements targeted by the index, one per indexed property.

IsDescending

Gets the sort order requested for each indexed JSON element, parallel to Elements, or null if every element uses ascending order.

Methods

Name Description
Equals(Object)

Determines whether the specified object is equal to the current object.

Equals(RelationalJsonIndex)

Indicates whether the current object is equal to another object of the same type.

GetHashCode()

Serves as the default hash function.

IsElementDescending(Int32)

Resolves whether the element at index should be sorted in descending order, honoring the shorthand where an empty IsDescending list means every element is descending.

Applies to