Skip to content

Releases: CaffeinatedCoder/EFCore.ComplexIndexes

v3.1.5

05 Jun 16:44

Choose a tag to compare

What's Changed

New Features

Support for registering NpgsqlComplexIndexes with custom internal service providers

If your application builds its own IServiceProvider and passes it to .UseInternalServiceProvider(...), EF Core prevents .UseNpgsqlComplexIndexes() from modifying services. Instead, register the generator directly on your IServiceCollection:

var provider = new ServiceCollection()
    .AddEntityFrameworkNpgsql()
    .AddNpgsqlComplexIndexes() // ← Add this for expression indexes
    .BuildServiceProvider();

Full Changelog: v3.1.0...v3.1.5

v3.1.0

04 Jun 21:42

Choose a tag to compare

What's Changed

New Features

Per-column sort direction

Wrap any member in DbOrder.Desc(...) (or DbOrder.Asc(...), the default) to control its sort order. Because a wrapped member is a method call, C# requires you to name it in the anonymous type:

builder.HasComplexCompositeIndex(
    c => new { c.HybridDateTime.DateTime, Counter = DbOrder.Desc(c.HybridDateTime.Counter), c.Id },
    indexName: "IX_Commits_DateTime_Counter_Id");
// CREATE INDEX "IX_Commits_DateTime_Counter_Id" ON ... ("DateTime", "Counter" DESC, "Id");

Direction maps to EF Core's native CreateIndexOperation.IsDescending, so it is rendered by every relational provider (SQL Server, SQLite, PostgreSQL) — no extra wiring required. Re-declaring an index over the same columns updates its direction.

Full Changelog: v3.0.0...v3.1.0

v3.0.0

03 Jun 13:40

Choose a tag to compare

What's Changed

New Features

Add PostgreSQL expression index support and enhance complex index handling

  • Introduced expression index functionality for PostgreSQL, including migration SQL generation for CREATE INDEX … ((expr)).

Fixes

  • Fix phantom complex-index churn on every migrations add by @T0PP1ng in #5

New Contributors

Full Changelog: v2.0.5...v3.0.0

v2.0.5

14 May 06:44

Choose a tag to compare

Full Changelog: v2.0.2...v2.0.5

  • resolves #4

v2.0.0

14 Feb 07:48

Choose a tag to compare

  • Added a new EFCore.ComplexIndexes.PostgreSQL package with PostgreSQL-specific complex index extensions (GIN, GiST, BRIN, SP-GiST, hash, operator classes, covering columns, concurrent creation, and nulls distinct handling).
  • Introduced PostgreSQL design-time services and model differ validation to ensure only supported Npgsql annotations are used during migrations.
  • Enhanced complex index handling to carry provider-specific annotations through migrations.
  • Added solution-wide NuGet package metadata and build settings via Directory.Build.props.
  • Updated tests to cover new provider-annotation serialization and index descriptor signature changes.
  • Documented PostgreSQL support and package details in the README.

v1.0.2

12 Feb 16:07

Choose a tag to compare

Full Changelog: v1.0.1...v1.0.2

v1.0.1

12 Feb 10:38

Choose a tag to compare