Repository navigation
Done
Labels
area/expression-indexesExpression, typed lambda and JSON member indexesbreakingChanges an answer or a signatureenhancementNew feature or requestpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQL
Milestone
Description
2026-11-24: built on the branch feat/179-unbound, rebased onto main after #178 merged; its PR is #183. Offline: 749 of the kernel's tests, 190 of the PostgreSQL package's, 85 of the second provider's. Live: 4 and 73 on PostgreSQL 16 and 18, 86 on SQL Server 2022, the consumer smoke test's 47 rows.
What is there:
- A lambda is translated once at the call and thrown away, with every value it reads from outside made a constant; the declaration is held on the entity type as it was written, under its final key when it has a name and under
CodoMetis:{Owner}:~{number}otherwise. SchemaKitBindingConventionbinds last among the finalizing conventions, by writing the declaration with a writer that makes segments of its lambdas. The contract has no new member.- Refused at the call: a name that is taken, and a declaration without a name that equals one held already. Refused at finalization, naming both in the order written: two that are one key once they are SQL.
GetDeclarations,FindDeclarationandRedeclarework before finalization;SqlTemplate.IsBoundsays which state a template is in.- Eight rules were removed in turn, and a test failed for each. A ninth, that a lambda in an operational property is noticed before the writer decides to write it, had no test that could fail, since the stored value writes operational properties too; the rule is gone.
Not as the issue says:
- The second binding on the finalized model is not here. The translator asks nothing of the model yet, so both bindings would be the same text and no test could fail without the check. It goes to Binder, slice 3: the translator takes nullability and literals from the model #180, where the binding reads the model.
PredicateandKeyTarget.Templategot their shape in Binder, slice 1: templates stored as segments, format v 3, and a resolver that scans nothing #178. New here isSqlTemplate.IsBound.- Nothing in the contract binds a lambda without a model. The second provider's tests of what the one spelling writes now declare the lambda on a model and read it from the finalized one (
Harness/Bound.cs, with anAudit:comment).
Part of #114 (decided 2026-11-24). After slice 1. Spike F (#177) is the measurement.
Change
- The provider's factory checks the lambda at the call and makes its captured values constants; the declaration is held on the entity type as an object, in the order written, under a key no stored key can have.
- A finalizing convention, added last by the plugin that adds the wiring convention, binds each declaration and stores it. The spelling travels with the unbound value.
- The declaration is bound a second time on the finalized model, and a different result is refused.
- A repeated declaration is refused at the call, by its name or by its tree; two that bind to one stored key are refused at finalization, naming both.
PredicateandKeyTarget.Templatetake their final public shape (The lambda factories leave the kernel: Predicate.Of and KeyTarget.Of take no provider and spell SQL as Npgsql does #112, point 2): no SQL string, not made from text.GetDeclarations,FindDeclarationandRedeclarework on unbound declarations before finalization.
Done when
Each row of spike F's README is a test against the kernel on Npgsql, SQL Server and SQLite, the consumer smoke test passes every path, and ConsumerCompileTests compiles a consumer against the new shape with nothing suppressed.
Metadata
Metadata
Assignees
Labels
area/expression-indexesExpression, typed lambda and JSON member indexesbreakingChanges an answer or a signatureenhancementNew feature or requestpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQL
Activity