Skip to content

Apply filters and Sorting to the Query Builder

The QueryBuilder class contains two types of filterable properties: QueryField and QueryAndSortField. Sorting can only be applied to QueryAndSortField fields, while filters can be applied to both types.

Filtering Methods

Every filter method returns the QueryBuilder instance, allowing you to chain multiple filters together.

Clear

Declaration

QueryBuilder Clear( )

Description

Clears the value of the field.

SetOp

Declaration

QueryBuilder SetOp(QueryFilter.OpOptions op, string value)

Description

Sets the value to be filtered and the operation to use. Use the QueryFilter.OpOptions enum to specify the operation.

Equals

Declaration

QueryBuilder Equals(string value)

Description

Sets the value to be filtered and the operation to use as Equals.

NotEquals

Declaration

QueryBuilder NotEquals(string value)

Description

Sets the value to be filtered and the operation to use as NotEquals.

Contains

Declaration

QueryBuilder Contains(string value)

Description

Sets the value to be filtered and the operation to use as Contains.

GreaterThan

Declaration

QueryBuilder GreaterThan(string value)

Description

Sets the value to be filtered and the operation to use as GreaterThan.

LessThan

Declaration

QueryBuilder LessThan(string value)

Description

Sets the value to be filtered and the operation to use as LessThan.

GreaterThanOrEquals

Declaration

QueryBuilder GreaterThanOrEquals(string value)

Description

Sets the value to be filtered and the operation to use as GreaterThanOrEquals.

LessThanOrEquals

Declaration

QueryBuilder LessThanOrEquals(string value)

Description

Sets the value to be filtered and the operation to use as LessThanOrEquals.

Sorting Methods

SetIsAscending

Declaration

QueryBuilder SetIsAscending(bool value)

Description

Sets the order of the field. Use true for ascending and false for descending.

Ascending

Declaration

QueryBuilder Ascending( )

Description

Sets the order of the field to Ascending.

Descending

Declaration

QueryBuilder Descending( )

Description

Sets the order of the field to Descending.