Class QueryableBuilder
- Namespace
- JsonApiDotNetCore.Queries.QueryableBuilding
- Assembly
- JsonApiDotNetCore.dll
Drives conversion from QueryLayer into system Expression trees.
[PublicAPI]
public class QueryableBuilder : IQueryableBuilder
- Inheritance
-
QueryableBuilder
- 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.
Constructors
QueryableBuilder(IIncludeClauseBuilder, IWhereClauseBuilder, IOrderClauseBuilder, ISkipTakeClauseBuilder, ISelectClauseBuilder)
public QueryableBuilder(IIncludeClauseBuilder includeClauseBuilder, IWhereClauseBuilder whereClauseBuilder, IOrderClauseBuilder orderClauseBuilder, ISkipTakeClauseBuilder skipTakeClauseBuilder, ISelectClauseBuilder selectClauseBuilder)
Parameters
includeClauseBuilder
IIncludeClauseBuilderwhereClauseBuilder
IWhereClauseBuilderorderClauseBuilder
IOrderClauseBuilderskipTakeClauseBuilder
ISkipTakeClauseBuilderselectClauseBuilder
ISelectClauseBuilder
Methods
ApplyFilter(Expression, FilterExpression, ResourceType, QueryableBuilderContext)
protected virtual Expression ApplyFilter(Expression source, FilterExpression filter, ResourceType resourceType, QueryableBuilderContext context)
Parameters
source
Expressionfilter
FilterExpressionresourceType
ResourceTypecontext
QueryableBuilderContext
Returns
ApplyInclude(Expression, IncludeExpression, ResourceType, QueryableBuilderContext)
protected virtual Expression ApplyInclude(Expression source, IncludeExpression include, ResourceType resourceType, QueryableBuilderContext context)
Parameters
source
Expressioninclude
IncludeExpressionresourceType
ResourceTypecontext
QueryableBuilderContext
Returns
ApplyPagination(Expression, PaginationExpression, ResourceType, QueryableBuilderContext)
protected virtual Expression ApplyPagination(Expression source, PaginationExpression pagination, ResourceType resourceType, QueryableBuilderContext context)
Parameters
source
Expressionpagination
PaginationExpressionresourceType
ResourceTypecontext
QueryableBuilderContext
Returns
ApplyQuery(QueryLayer, QueryableBuilderContext)
public virtual Expression ApplyQuery(QueryLayer layer, QueryableBuilderContext context)
Parameters
layer
QueryLayercontext
QueryableBuilderContext
Returns
ApplySelection(Expression, FieldSelection, ResourceType, QueryableBuilderContext)
protected virtual Expression ApplySelection(Expression source, FieldSelection selection, ResourceType resourceType, QueryableBuilderContext context)
Parameters
source
Expressionselection
FieldSelectionresourceType
ResourceTypecontext
QueryableBuilderContext
Returns
ApplySort(Expression, SortExpression, ResourceType, QueryableBuilderContext)
protected virtual Expression ApplySort(Expression source, SortExpression sort, ResourceType resourceType, QueryableBuilderContext context)
Parameters
source
Expressionsort
SortExpressionresourceType
ResourceTypecontext
QueryableBuilderContext