Skip to content

✨ feat: move to eQuantic.Core.Data 7.0 and publish through trusted publishing - #6

Merged
edgarmesquita merged 4 commits into
masterfrom
feat/core-data-7
Nov 14, 2026
Merged

edgarmesquita merged 4 commits into
masterfrom
feat/core-data-7

Conversation

@edgarmesquita

Copy link
Copy Markdown
Contributor

Two things this family needed after eQuantic.Core.Data 7.0.0 went out... the publish moves to trusted publishing, and the packages move to the 7.0.0 contracts.

Trusted publishing. The publish job now logs in to nuget.org with its OIDC token (NuGet/login, pinned to v1.2.0) and pushes with the short-lived key it gets back, instead of the long-lived nuget_key secret. The policy on nuget.org names this repository, release.yml and the nuget-release environment, so renaming either one stops the login before any push. core-data released 7.0.0 the same way today.

eQuantic.Core.Data.Abstractions 7.0.0. All 14 packages move from 6.9.0, and each one bumps its minor within its own line, as with the 6.0 bump (10.x, 8.x, and 4.x for the shared assemblies).

The bump alone would have shipped a quiet defect. 7.0 added three things to QueryOptions that these repositories would have ignored without a word: Skip/Take, nulls placed first or last in a sort, and shaped includes. A read asking for ten rows would have returned all of them. So they are honoured here, with the same rules as the core-data engines:

  • Skip/Take shape the rows a read returns. Count, Any, All, Sum and GetPaged refuse them with NotSupportedException (same words as core-data), because they don't return rows that way.
  • A nulls placement on a relational store becomes a leading "is null" key. MongoDB and Cosmos DB sort nulls as the smallest value, so first ascending and last descending are a plain sort there. Cosmos DB orders by document paths only, so it refuses the other two before sending anything.
  • A shaped include is EF Core's filtered include, built from the shape (filter, order with nulls, skip, take).

The other 7.0 additions are capabilities a repository opts into (upserts, returning updates, member-scoped modify, distinct reads, named locks) and the native engine's modeling attributes. These repositories don't implement them, and the walkthrough now says so... a caller tests for the interface, so nothing is faked.

Tests: the scenarios run in memory, against a real PostgreSQL (which puts nulls last ascending, so NullsOrder.First is only right through the new key), against a real MongoDB, and Cosmos DB checks the plain ORDER BY and the refusal without a server.

One thing I left alone: eQuantic.Core.Data.EntityFramework.sln has two projects with the same name, so dotnet build on the solution fails with MSB5004. CI builds each project on its own, so it never shows there.

The publish job exchanges its OIDC token for a short-lived API key (NuGet/login) instead of reading the long-lived nuget_key secret. nuget.org's policy for this repository names release.yml and the nuget-release environment.
…package minors

Moves all 14 packages from Abstractions 6.9.0 to 7.0.0 and bumps each package's minor within its own line (Net10 in 10.x, Net8 in 8.x, base and Relational in 4.x), since the major tracks the .NET major.
QueryOptions 7.0 says which rows a read returns, and these repositories ignored it: Skip/Take returned every row, a nulls placement was dropped and a shaped include loaded the whole collection. They now apply them as the core-data engines do.

- Skip/Take shape the returned rows. Count, Any, All, Sum and GetPaged refuse them with the same NotSupportedException as core-data.
- A nulls placement becomes a leading "is null" key on relational stores. MongoDB and Cosmos DB sort nulls as the smallest value, so their native placements stay a plain sort, and Cosmos DB, which orders by paths only, refuses the other two before any request.
- A shaped include is EF Core's filtered include, built from the shape's filter, order (with nulls), skip and take.

Proven in memory, against a real PostgreSQL and MongoDB, and on Cosmos DB through the query it would send.
A non-nullable value reached through an optional navigation (x.Team.Rank) is NULL when the navigation is missing, since the store joins it. The nulls key skipped every non-nullable value type, so such a sort kept the store's own placement. It now lifts the value to Nullable<T> whenever the member chain reads through a reference other than the entity itself.

@edgarmesquita edgarmesquita left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Secondary review, round 1 (Antigravity), because Copilot can't be requested on this repository (GitHub answers 422, not a collaborator).

Two findings: one fixed, one dismissed.

body = convert.Operand;
}

if (body.Type.IsValueType && Nullable.GetUnderlyingType(body.Type) is null)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[high] A non-nullable value read through an optional navigation (x.Team.Rank) is NULL when the navigation is missing, and the nulls key skipped it as a value that can't be null.

Fixed in cc12424: the value is lifted to Nullable<T> whenever the member chain reads through a reference other than the entity. The new test orders runs by x.Team!.Rank in memory and on a real PostgreSQL, and without the fix PostgreSQL fails exactly the two placements it doesn't give by itself (first ascending, last descending).

body = Order(body, false, element, sort.KeySelector, sort.Descending, sort.Nulls, placement, ref first);
}

if (shape.SkipCount is > 0)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[medium] A negative or zero skip is dropped instead of passed on.

Not a defect: Abstractions 7.0.0 refuses a negative count in both QueryOptions.Skip and IncludeQuery.Skip (ArgumentOutOfRangeException), and a skip of zero returns the same rows. core-data's own ReadShapes.Window drops it the same way.

@edgarmesquita edgarmesquita left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Secondary review, round 2 (Antigravity), because Copilot can't be requested on this repository.

No findings on cc12424, which carries the round 1 fix. The review closes here.

@sonarqubecloud

Copy link
Copy Markdown

@edgarmesquita
edgarmesquita merged commit 94b7f58 into master Nov 14, 2026
43 checks passed
@edgarmesquita
edgarmesquita deleted the feat/core-data-7 branch November 14, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants