Class SqlNodeMutatorContext
- Namespace
- LfrlAnvil.Sql.Expressions.Visitors
- Assembly
- LfrlAnvil.Sql.Core.dll
Represents a context of an ISqlNodeVisitor that allows to replace parts of an SQL syntax tree.
public class SqlNodeMutatorContext
- Inheritance
-
SqlNodeMutatorContext
- Inherited Members
Methods
Leaf(SqlNodeBase)
Creates a new SqlNodeMutatorContext.MutationResult instance with IsNode equal to false.
[Pure]
protected static SqlNodeMutatorContext.MutationResult Leaf(SqlNodeBase value)
Parameters
value
SqlNodeBaseSQL node that is the result of a mutation.
Returns
Mutate(SqlNodeBase, SqlNodeAncestors)
Mutates the provided node
.
[Pure]
protected virtual SqlNodeMutatorContext.MutationResult Mutate(SqlNodeBase node, SqlNodeAncestors ancestors)
Parameters
node
SqlNodeBaseNode to mutate.
ancestors
SqlNodeAncestorsSqlNodeAncestors associated with the
node
to mutate.
Returns
- SqlNodeMutatorContext.MutationResult
Mutation result.
Remarks
See Node(SqlNodeBase) and Leaf(SqlNodeBase) for more information on how the result affects an SQL syntax tree traversal.
Node(SqlNodeBase)
Creates a new SqlNodeMutatorContext.MutationResult instance with IsNode equal to true.
[Pure]
protected static SqlNodeMutatorContext.MutationResult Node(SqlNodeBase value)
Parameters
value
SqlNodeBaseSQL node that is the result of a mutation.
Returns
Visit(SqlNodeBase)
Visits the provided node
and returns the result of its mutation.
[Pure]
public SqlNodeBase Visit(SqlNodeBase node)
Parameters
node
SqlNodeBaseNode to visit.
Returns
- SqlNodeBase
Result of
node
mutation.