Table of Contents

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 IIncludeClauseBuilder
whereClauseBuilder IWhereClauseBuilder
orderClauseBuilder IOrderClauseBuilder
skipTakeClauseBuilder ISkipTakeClauseBuilder
selectClauseBuilder ISelectClauseBuilder

Methods

ApplyFilter(Expression, FilterExpression, ResourceType, QueryableBuilderContext)

protected virtual Expression ApplyFilter(Expression source, FilterExpression filter, ResourceType resourceType, QueryableBuilderContext context)

Parameters

source Expression
filter FilterExpression
resourceType ResourceType
context QueryableBuilderContext

Returns

Expression

ApplyInclude(Expression, IncludeExpression, ResourceType, QueryableBuilderContext)

protected virtual Expression ApplyInclude(Expression source, IncludeExpression include, ResourceType resourceType, QueryableBuilderContext context)

Parameters

source Expression
include IncludeExpression
resourceType ResourceType
context QueryableBuilderContext

Returns

Expression

ApplyPagination(Expression, PaginationExpression, ResourceType, QueryableBuilderContext)

protected virtual Expression ApplyPagination(Expression source, PaginationExpression pagination, ResourceType resourceType, QueryableBuilderContext context)

Parameters

source Expression
pagination PaginationExpression
resourceType ResourceType
context QueryableBuilderContext

Returns

Expression

ApplyQuery(QueryLayer, QueryableBuilderContext)

public virtual Expression ApplyQuery(QueryLayer layer, QueryableBuilderContext context)

Parameters

layer QueryLayer
context QueryableBuilderContext

Returns

Expression

ApplySelection(Expression, FieldSelection, ResourceType, QueryableBuilderContext)

protected virtual Expression ApplySelection(Expression source, FieldSelection selection, ResourceType resourceType, QueryableBuilderContext context)

Parameters

source Expression
selection FieldSelection
resourceType ResourceType
context QueryableBuilderContext

Returns

Expression

ApplySort(Expression, SortExpression, ResourceType, QueryableBuilderContext)

protected virtual Expression ApplySort(Expression source, SortExpression sort, ResourceType resourceType, QueryableBuilderContext context)

Parameters

source Expression
sort SortExpression
resourceType ResourceType
context QueryableBuilderContext

Returns

Expression