Class QueryExpressionRewriter<TArgument>
- Namespace
- JsonApiDotNetCore.Queries.Expressions
- Assembly
- JsonApiDotNetCore.dll
Building block for rewriting QueryExpression trees. It walks through nested expressions and updates the parent on changes.
[PublicAPI]
public class QueryExpressionRewriter<TArgument> : QueryExpressionVisitor<TArgument, QueryExpression?>
Type Parameters
TArgument
- Inheritance
-
QueryExpressionVisitor<TArgument, QueryExpression>QueryExpressionRewriter<TArgument>
- Inherited Members
Methods
DefaultVisit(QueryExpression, TArgument)
public override QueryExpression DefaultVisit(QueryExpression expression, TArgument argument)
Parameters
expression
QueryExpressionargument
TArgument
Returns
Visit(QueryExpression, TArgument)
public override QueryExpression? Visit(QueryExpression expression, TArgument argument)
Parameters
expression
QueryExpressionargument
TArgument
Returns
VisitAny(AnyExpression, TArgument)
public override QueryExpression? VisitAny(AnyExpression expression, TArgument argument)
Parameters
expression
AnyExpressionargument
TArgument
Returns
VisitComparison(ComparisonExpression, TArgument)
public override QueryExpression? VisitComparison(ComparisonExpression expression, TArgument argument)
Parameters
expression
ComparisonExpressionargument
TArgument
Returns
VisitCount(CountExpression, TArgument)
public override QueryExpression? VisitCount(CountExpression expression, TArgument argument)
Parameters
expression
CountExpressionargument
TArgument
Returns
VisitHas(HasExpression, TArgument)
public override QueryExpression? VisitHas(HasExpression expression, TArgument argument)
Parameters
expression
HasExpressionargument
TArgument
Returns
VisitInclude(IncludeExpression, TArgument)
public override QueryExpression VisitInclude(IncludeExpression expression, TArgument argument)
Parameters
expression
IncludeExpressionargument
TArgument
Returns
VisitIncludeElement(IncludeElementExpression, TArgument)
public override QueryExpression VisitIncludeElement(IncludeElementExpression expression, TArgument argument)
Parameters
expression
IncludeElementExpressionargument
TArgument
Returns
VisitIsType(IsTypeExpression, TArgument)
public override QueryExpression VisitIsType(IsTypeExpression expression, TArgument argument)
Parameters
expression
IsTypeExpressionargument
TArgument
Returns
VisitList<TExpression>(IImmutableList<TExpression>, TArgument)
protected virtual IImmutableList<TExpression> VisitList<TExpression>(IImmutableList<TExpression> elements, TArgument argument) where TExpression : QueryExpression
Parameters
elements
IImmutableList<TExpression>argument
TArgument
Returns
- IImmutableList<TExpression>
Type Parameters
TExpression
VisitLiteralConstant(LiteralConstantExpression, TArgument)
public override QueryExpression VisitLiteralConstant(LiteralConstantExpression expression, TArgument argument)
Parameters
expression
LiteralConstantExpressionargument
TArgument
Returns
VisitLogical(LogicalExpression, TArgument)
public override QueryExpression? VisitLogical(LogicalExpression expression, TArgument argument)
Parameters
expression
LogicalExpressionargument
TArgument
Returns
VisitMatchText(MatchTextExpression, TArgument)
public override QueryExpression? VisitMatchText(MatchTextExpression expression, TArgument argument)
Parameters
expression
MatchTextExpressionargument
TArgument
Returns
VisitNot(NotExpression, TArgument)
public override QueryExpression? VisitNot(NotExpression expression, TArgument argument)
Parameters
expression
NotExpressionargument
TArgument
Returns
VisitNullConstant(NullConstantExpression, TArgument)
public override QueryExpression VisitNullConstant(NullConstantExpression expression, TArgument argument)
Parameters
expression
NullConstantExpressionargument
TArgument
Returns
VisitPagination(PaginationExpression, TArgument)
public override QueryExpression VisitPagination(PaginationExpression expression, TArgument argument)
Parameters
expression
PaginationExpressionargument
TArgument
Returns
VisitPaginationElementQueryStringValue(PaginationElementQueryStringValueExpression, TArgument)
public override QueryExpression VisitPaginationElementQueryStringValue(PaginationElementQueryStringValueExpression expression, TArgument argument)
Parameters
expression
PaginationElementQueryStringValueExpressionargument
TArgument
Returns
VisitPaginationQueryStringValue(PaginationQueryStringValueExpression, TArgument)
public override QueryExpression VisitPaginationQueryStringValue(PaginationQueryStringValueExpression expression, TArgument argument)
Parameters
expression
PaginationQueryStringValueExpressionargument
TArgument
Returns
VisitQueryStringParameterScope(QueryStringParameterScopeExpression, TArgument)
public override QueryExpression? VisitQueryStringParameterScope(QueryStringParameterScopeExpression expression, TArgument argument)
Parameters
expression
QueryStringParameterScopeExpressionargument
TArgument
Returns
VisitQueryableHandler(QueryableHandlerExpression, TArgument)
public override QueryExpression VisitQueryableHandler(QueryableHandlerExpression expression, TArgument argument)
Parameters
expression
QueryableHandlerExpressionargument
TArgument
Returns
VisitResourceFieldChain(ResourceFieldChainExpression, TArgument)
public override QueryExpression VisitResourceFieldChain(ResourceFieldChainExpression expression, TArgument argument)
Parameters
expression
ResourceFieldChainExpressionargument
TArgument
Returns
VisitSet<TExpression>(IImmutableSet<TExpression>, TArgument)
protected virtual IImmutableSet<TExpression> VisitSet<TExpression>(IImmutableSet<TExpression> elements, TArgument argument) where TExpression : QueryExpression
Parameters
elements
IImmutableSet<TExpression>argument
TArgument
Returns
- IImmutableSet<TExpression>
Type Parameters
TExpression
VisitSort(SortExpression, TArgument)
public override QueryExpression? VisitSort(SortExpression expression, TArgument argument)
Parameters
expression
SortExpressionargument
TArgument
Returns
VisitSortElement(SortElementExpression, TArgument)
public override QueryExpression? VisitSortElement(SortElementExpression expression, TArgument argument)
Parameters
expression
SortElementExpressionargument
TArgument
Returns
VisitSparseFieldSet(SparseFieldSetExpression, TArgument)
public override QueryExpression VisitSparseFieldSet(SparseFieldSetExpression expression, TArgument argument)
Parameters
expression
SparseFieldSetExpressionargument
TArgument
Returns
VisitSparseFieldTable(SparseFieldTableExpression, TArgument)
public override QueryExpression? VisitSparseFieldTable(SparseFieldTableExpression expression, TArgument argument)
Parameters
expression
SparseFieldTableExpressionargument
TArgument