Skip to content

feat(efcore): Add configurable post-expansion expression transformers - #16

Draft
ycherkes wants to merge 12 commits into
mainfrom
feature/efcore-expression-transformers
Draft

ycherkes wants to merge 12 commits into
mainfrom
feature/efcore-expression-transformers

Conversation

@ycherkes

Copy link
Copy Markdown
Contributor

Summary

  • Add opt-in UseRaffinertExpressions(options => options.Transform(...)) overloads, without touching Core or introducing a production optimizer dependency.
  • Execute ordered transforms after Raffinert expansion and before the original EF Core compiler/native parameter extraction for ordinary sync/async queries.
  • Keep callbacks in immutable per-context options rather than internal service-provider global state; keep separate interceptor as expansion-only fallback.
  • Document behavior, limitations and side-effect-free requirement of external optimizer.

Integration coverage

  • Add actual Linq.Expression.Optimizer 1.0.39 as an integration-test-only NuGet dependency and pass ExpressionOptimizer.visit into the pipeline, execute SQLite query containing Raffinert Invoke and a Boolean expression and assert SQL/results.
  • Verify transformer order, options isolation and explicit null-result failure.

Verification

Not run locally: .NET SDK is unavailable in execution environment. CI and integration suite must pass before ready for review. Review external optimizer's captured-closure evaluation versus native EF parameter semantics for production usage.

Separate from draft #15 (Condition.Balance()): no change to Core.

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.

1 participant