SqlTreePruner Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A visitor that processes a SQL tree and prunes out parts which aren't needed.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public class SqlTreePruner : System.Linq.Expressions.ExpressionVisitor
type SqlTreePruner = class
inherit ExpressionVisitor
Public Class SqlTreePruner
Inherits ExpressionVisitor
- Inheritance
-
SqlTreePruner
Constructors
SqlTreePruner() |
Properties
CurrentTableAlias |
When visiting a nested TableExpressionBase (e.g. a select within a set operation), this holds the table alias of the top-most table (the one which has the alias referenced by columns). This is needed in order to properly prune the projection of such nested selects, which don't themselves have an alias. |
ReferencedColumnMap |
Maps table aliases to the list of column aliases found referenced on them. |
Methods
Prune(Expression) |
Prunes the given Expression, removing parts which aren't needed. |
PruneSelect(SelectExpression, Boolean) |
Prunes a SelectExpression, removes tables inside it which aren't referenced, and optionally also projections which aren't referenced from outside it. |
PruneTopLevelSelect(SelectExpression) |
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release. |
VisitExtension(Expression) | Visits the children of the extension expression. |