Repository navigation
✨ feat: move to eQuantic.Core.Data 7.0 and publish through trusted publishing - #6
Conversation
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
left a comment
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
[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) |
There was a problem hiding this comment.
[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
left a comment
There was a problem hiding this comment.
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.
|



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-livednuget_keysecret. The policy on nuget.org names this repository,release.ymland thenuget-releaseenvironment, 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
QueryOptionsthat 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/Takeshape the rows a read returns.Count,Any,All,SumandGetPagedrefuse them withNotSupportedException(same words as core-data), because they don't return rows that way.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.Firstis only right through the new key), against a real MongoDB, and Cosmos DB checks the plainORDER BYand the refusal without a server.One thing I left alone:
eQuantic.Core.Data.EntityFramework.slnhas two projects with the same name, sodotnet buildon the solution fails with MSB5004. CI builds each project on its own, so it never shows there.