Table of Contents

Class EnsureIndexOperation

Namespace
eQuantic.Core.Data.Migration
Assembly
eQuantic.Core.Data.dll

Ensures an index (single-key or composite) exists.

public sealed class EnsureIndexOperation : MigrationOperation
Inheritance
EnsureIndexOperation
Inherited Members

Constructors

EnsureIndexOperation(Type, IReadOnlyList<IndexKey>)

Ensures an index (single-key or composite) exists.

public EnsureIndexOperation(Type entityType, IReadOnlyList<IndexKey> keys)

Parameters

entityType Type
keys IReadOnlyList<IndexKey>

Properties

ExpireAfter

When set, a TTL index expiring documents this long after the (single) key's date value.

public TimeSpan? ExpireAfter { get; init; }

Property Value

TimeSpan?

Filter

When set, a partial/filtered index: only rows matching this typed predicate are indexed.

public LambdaExpression? Filter { get; init; }

Property Value

LambdaExpression

Keys

The ordered index keys.

public IReadOnlyList<IndexKey> Keys { get; }

Property Value

IReadOnlyList<IndexKey>

Method

The index structure; providers reject methods they cannot build.

public IndexMethod Method { get; init; }

Property Value

IndexMethod

Name

An explicit index name, or null to let the provider derive one.

public string? Name { get; init; }

Property Value

string

Unique

Whether the index enforces uniqueness.

public bool Unique { get; init; }

Property Value

bool