Class WhereClauseBuilder
- Namespace
- JsonApiDotNetCore.Queries.QueryableBuilding
- Assembly
- JsonApiDotNetCore.dll
Transforms FilterExpression into Where<TSource>(IQueryable<TSource>, Expression<Func<TSource, bool>>) calls.
[PublicAPI]
public class WhereClauseBuilder : QueryClauseBuilder, IWhereClauseBuilder
- Inheritance
-
WhereClauseBuilder
- Implements
- Inherited Members
Remarks
Types that implement this interface are stateless by design. Existing instances are reused recursively (perhaps this one not today, but that may change), so don't store mutable state in private fields when implementing this interface or deriving from the built-in implementations. To pass custom state, use the State property. The only private field allowed is a stack where you push/pop state, so it works recursively.
Methods
ApplyWhere(FilterExpression, QueryClauseBuilderContext)
public virtual Expression ApplyWhere(FilterExpression filter, QueryClauseBuilderContext context)
Parameters
filter
FilterExpressioncontext
QueryClauseBuilderContext
Returns
VisitAny(AnyExpression, QueryClauseBuilderContext)
public override Expression VisitAny(AnyExpression expression, QueryClauseBuilderContext context)
Parameters
expression
AnyExpressioncontext
QueryClauseBuilderContext
Returns
VisitComparison(ComparisonExpression, QueryClauseBuilderContext)
public override Expression VisitComparison(ComparisonExpression expression, QueryClauseBuilderContext context)
Parameters
expression
ComparisonExpressioncontext
QueryClauseBuilderContext
Returns
VisitHas(HasExpression, QueryClauseBuilderContext)
public override Expression VisitHas(HasExpression expression, QueryClauseBuilderContext context)
Parameters
expression
HasExpressioncontext
QueryClauseBuilderContext
Returns
VisitIsType(IsTypeExpression, QueryClauseBuilderContext)
public override Expression VisitIsType(IsTypeExpression expression, QueryClauseBuilderContext context)
Parameters
expression
IsTypeExpressioncontext
QueryClauseBuilderContext
Returns
VisitLiteralConstant(LiteralConstantExpression, QueryClauseBuilderContext)
public override Expression VisitLiteralConstant(LiteralConstantExpression expression, QueryClauseBuilderContext context)
Parameters
expression
LiteralConstantExpressioncontext
QueryClauseBuilderContext
Returns
VisitLogical(LogicalExpression, QueryClauseBuilderContext)
public override Expression VisitLogical(LogicalExpression expression, QueryClauseBuilderContext context)
Parameters
expression
LogicalExpressioncontext
QueryClauseBuilderContext
Returns
VisitMatchText(MatchTextExpression, QueryClauseBuilderContext)
public override Expression VisitMatchText(MatchTextExpression expression, QueryClauseBuilderContext context)
Parameters
expression
MatchTextExpressioncontext
QueryClauseBuilderContext
Returns
VisitNot(NotExpression, QueryClauseBuilderContext)
public override Expression VisitNot(NotExpression expression, QueryClauseBuilderContext context)
Parameters
expression
NotExpressioncontext
QueryClauseBuilderContext
Returns
VisitNullConstant(NullConstantExpression, QueryClauseBuilderContext)
public override Expression VisitNullConstant(NullConstantExpression expression, QueryClauseBuilderContext context)
Parameters
expression
NullConstantExpressioncontext
QueryClauseBuilderContext