Filter

model. Filter

Filter class that can be used to build api endpoint filters using a semi-natural language style.

Constructor

new Filter(addFilterCallback)

Source:
Parameters:
Name Type Description
addFilterCallback function

Callback that will be used to notify Filters that the filter is completed so it can be added to the list of filters.

Methods

(static) getFilter(addFilterCallback) → {Filter}

Source:

Create a filter instance

Parameters:
Name Type Description
addFilterCallback function

Callback to be called when the filter is completed.

Returns:

A instance of the Filter class that can be used to create filters.

Type
Filter

equals() → {Filter}

Source:

This method can be used to add a equals filter value

Returns:

Returns the modified filter for chaining

Type
Filter

ilike() → {Filter}

Source:

This method can be used to add a ilike filter value

Returns:

Returns the modified filter for chaining

Type
Filter

in() → {Filter}

Source:

This method can be used to add a in filter value

Returns:

Returns the modified filter for chaining

Type
Filter

like() → {Filter}

Source:

This method can be used to add a like filter value

Returns:

Returns the modified filter for chaining

Type
Filter

notEqual() → {Filter}

Source:

This method can be used to add a ne filter value

Returns:

Returns the modified filter for chaining

Type
Filter

notIn() → {Filter}

Source:

This method can be used to add a !in filter value

Returns:

Returns the modified filter for chaining

Type
Filter

nToken() → {Filter}

Source:

This method can be used to add a !token filter value

Returns:

Returns the modified filter for chaining

Type
Filter

on(propertyName) → {Filter}

Source:
Parameters:
Name Type Description
propertyName String

Property name that the filter should be applied on.

Returns:
Type
Filter

operator(operator, filterValue)

Source:

Utility function to add an operator with filterValue

Parameters:
Name Type Description
operator *

to use

filterValue *

to filter on

token() → {Filter}

Source:

This method can be used to add a tokens filter value

Returns:

Returns the modified filter for chaining

Type
Filter