Make all SQL expression nodes quotable #33008
Labels
area-aot
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-enhancement
Milestone
The interceptors generated for precompiled queries (#25009) will need to contain the SQL to get executed. However, we won't be able to always pre-generate the final SQL as a string; a single LINQ query may be the source of multiple SQL variations, mainly based on different null-ness of parameters included in it. If the number of premutations is small (up to a few nullable parameters), we should be able to pregenerate the final SQLs and stick them in the interceptor (that's #29753); but beyond a certain number of parameters that becomes too much. There are also cases where the SQL is totally dynamic, e.g. when we integrate actual parameter content into the SQL itself.
So in the general case, we need the interceptors to contain an expression representing the SQL, which would be the input for runtime processing which produces the final SQL string ("2nd part of the query pipeline"). This means we need to be able to "quote" all nodes in the SQL tree, i.e. generate C# code to be integrated into the interceptors, which would reconstruct that same tree again at runtime.
The text was updated successfully, but these errors were encountered: