You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Typed expression indexes: a captured Substring start renders unfolded, where EF Core folds it #117
A typed expression index or filter whose Substring start is a captured variable renders the start unfolded, where EF Core's query for the same lambda renders the folded value:
Lambda
Package
EF Core
x.Code.Substring(start) with int start = 1
substring("Code", (1 + 1))
substring("Code", 2)
x.Code.Substring(start, 3)
substring("Code", (1 + 1), 3)
substring("Code", 2, 3)
A literal start (Substring(1)) is already folded. PostgreSQL folds (1 + 1) before it matches an index to a query, so the index serves the query and no answer changes; the rendering still disagrees with EF Core's for no reason.
Fix
Evaluate a start that does not depend on the entity and render the folded value, as for a literal. The stored template changes only for indexes whose Substring rendering #72 already changes in 5.5.0, so it adds no re-create.
Activity