Table of Contents

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
QueryExpressionRewriter<TArgument>
Inherited Members

Methods

DefaultVisit(QueryExpression, TArgument)

public override QueryExpression DefaultVisit(QueryExpression expression, TArgument argument)

Parameters

expression QueryExpression
argument TArgument

Returns

QueryExpression

Visit(QueryExpression, TArgument)

public override QueryExpression? Visit(QueryExpression expression, TArgument argument)

Parameters

expression QueryExpression
argument TArgument

Returns

QueryExpression

VisitAny(AnyExpression, TArgument)

public override QueryExpression? VisitAny(AnyExpression expression, TArgument argument)

Parameters

expression AnyExpression
argument TArgument

Returns

QueryExpression

VisitComparison(ComparisonExpression, TArgument)

public override QueryExpression? VisitComparison(ComparisonExpression expression, TArgument argument)

Parameters

expression ComparisonExpression
argument TArgument

Returns

QueryExpression

VisitCount(CountExpression, TArgument)

public override QueryExpression? VisitCount(CountExpression expression, TArgument argument)

Parameters

expression CountExpression
argument TArgument

Returns

QueryExpression

VisitHas(HasExpression, TArgument)

public override QueryExpression? VisitHas(HasExpression expression, TArgument argument)

Parameters

expression HasExpression
argument TArgument

Returns

QueryExpression

VisitInclude(IncludeExpression, TArgument)

public override QueryExpression VisitInclude(IncludeExpression expression, TArgument argument)

Parameters

expression IncludeExpression
argument TArgument

Returns

QueryExpression

VisitIncludeElement(IncludeElementExpression, TArgument)

public override QueryExpression VisitIncludeElement(IncludeElementExpression expression, TArgument argument)

Parameters

expression IncludeElementExpression
argument TArgument

Returns

QueryExpression

VisitIsType(IsTypeExpression, TArgument)

public override QueryExpression VisitIsType(IsTypeExpression expression, TArgument argument)

Parameters

expression IsTypeExpression
argument TArgument

Returns

QueryExpression

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 LiteralConstantExpression
argument TArgument

Returns

QueryExpression

VisitLogical(LogicalExpression, TArgument)

public override QueryExpression? VisitLogical(LogicalExpression expression, TArgument argument)

Parameters

expression LogicalExpression
argument TArgument

Returns

QueryExpression

VisitMatchText(MatchTextExpression, TArgument)

public override QueryExpression? VisitMatchText(MatchTextExpression expression, TArgument argument)

Parameters

expression MatchTextExpression
argument TArgument

Returns

QueryExpression

VisitNot(NotExpression, TArgument)

public override QueryExpression? VisitNot(NotExpression expression, TArgument argument)

Parameters

expression NotExpression
argument TArgument

Returns

QueryExpression

VisitNullConstant(NullConstantExpression, TArgument)

public override QueryExpression VisitNullConstant(NullConstantExpression expression, TArgument argument)

Parameters

expression NullConstantExpression
argument TArgument

Returns

QueryExpression

VisitPagination(PaginationExpression, TArgument)

public override QueryExpression VisitPagination(PaginationExpression expression, TArgument argument)

Parameters

expression PaginationExpression
argument TArgument

Returns

QueryExpression

VisitPaginationElementQueryStringValue(PaginationElementQueryStringValueExpression, TArgument)

public override QueryExpression VisitPaginationElementQueryStringValue(PaginationElementQueryStringValueExpression expression, TArgument argument)

Parameters

expression PaginationElementQueryStringValueExpression
argument TArgument

Returns

QueryExpression

VisitPaginationQueryStringValue(PaginationQueryStringValueExpression, TArgument)

public override QueryExpression VisitPaginationQueryStringValue(PaginationQueryStringValueExpression expression, TArgument argument)

Parameters

expression PaginationQueryStringValueExpression
argument TArgument

Returns

QueryExpression

VisitQueryStringParameterScope(QueryStringParameterScopeExpression, TArgument)

public override QueryExpression? VisitQueryStringParameterScope(QueryStringParameterScopeExpression expression, TArgument argument)

Parameters

expression QueryStringParameterScopeExpression
argument TArgument

Returns

QueryExpression

VisitQueryableHandler(QueryableHandlerExpression, TArgument)

public override QueryExpression VisitQueryableHandler(QueryableHandlerExpression expression, TArgument argument)

Parameters

expression QueryableHandlerExpression
argument TArgument

Returns

QueryExpression

VisitResourceFieldChain(ResourceFieldChainExpression, TArgument)

public override QueryExpression VisitResourceFieldChain(ResourceFieldChainExpression expression, TArgument argument)

Parameters

expression ResourceFieldChainExpression
argument TArgument

Returns

QueryExpression

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 SortExpression
argument TArgument

Returns

QueryExpression

VisitSortElement(SortElementExpression, TArgument)

public override QueryExpression? VisitSortElement(SortElementExpression expression, TArgument argument)

Parameters

expression SortElementExpression
argument TArgument

Returns

QueryExpression

VisitSparseFieldSet(SparseFieldSetExpression, TArgument)

public override QueryExpression VisitSparseFieldSet(SparseFieldSetExpression expression, TArgument argument)

Parameters

expression SparseFieldSetExpression
argument TArgument

Returns

QueryExpression

VisitSparseFieldTable(SparseFieldTableExpression, TArgument)

public override QueryExpression? VisitSparseFieldTable(SparseFieldTableExpression expression, TArgument argument)

Parameters

expression SparseFieldTableExpression
argument TArgument

Returns

QueryExpression