Table of Contents

Interface IIndexOptions<TEntity>

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

Fluent options for a single-key index — providers reject the ones they cannot build, with guidance.

public interface IIndexOptions<TEntity> where TEntity : class

Type Parameters

TEntity

The entity type.

Methods

Descending()

Orders the key descending.

IIndexOptions<TEntity> Descending()

Returns

IIndexOptions<TEntity>

Filtered(Expression<Func<TEntity, bool>>)

Makes the index partial/filtered: only rows matching the typed predicate are indexed (PostgreSQL/SQL Server WHERE, MongoDB partial filter). The predicate goes through the same interpretation as query filters.

IIndexOptions<TEntity> Filtered(Expression<Func<TEntity, bool>> predicate)

Parameters

predicate Expression<Func<TEntity, bool>>

The typed row predicate.

Returns

IIndexOptions<TEntity>

Gin()

Builds a PostgreSQL GIN index — what makes jsonb and array predicates fast.

IIndexOptions<TEntity> Gin()

Returns

IIndexOptions<TEntity>

Named(string)

Gives the index an explicit name.

IIndexOptions<TEntity> Named(string name)

Parameters

name string

The index name.

Returns

IIndexOptions<TEntity>

Text()

Builds a text-search index (MongoDB text).

IIndexOptions<TEntity> Text()

Returns

IIndexOptions<TEntity>

Ttl(TimeSpan)

Makes the index a TTL index: documents expire this long after the key's date value (MongoDB).

IIndexOptions<TEntity> Ttl(TimeSpan expireAfter)

Parameters

expireAfter TimeSpan

The time to live.

Returns

IIndexOptions<TEntity>

Unique()

Makes the index enforce uniqueness.

IIndexOptions<TEntity> Unique()

Returns

IIndexOptions<TEntity>