Reference Source
import {JSONStoreQueryPart} from 'react-native-ibm-mobilefirst-jsonstore'
public class | source

JSONStoreQueryPart

This class is used to build query objects. It represents a group of operations that are joined with an AND.

Method Summary

Public Methods
public

addBetween(searchField: string, start: number, end: number): *

Add BETWEEN criteria to the query part.

public

addEqual(searchField: string, value: any): *

Add a EQUAL criteria to the query part.

public

addGreaterThan(searchField: string, value: number): *

Add GREATER THAN criteria to the query part.

public

addGreaterThanOrEqual(searchField: string, value: number): *

Add GREATER THAN OR EQUAL criteria to the query part.

public

addInside(searchField: string, values: array): *

Add a INSIDE criteria to the query part.

public

addLeftLike(searchField: string, value: any): *

Add a LEFT LIKE criteria to the query part.

public

addLessThan(searchField: string, value: number): *

Add LESS THAN criteria to the query part.

public

addLessThanOrEqual(searchField: string, value: number): *

Add LESS THAN OR EQUAL criteria to the query part.

public

addLike(searchField: string, value: any): *

Add a LIKE criteria to the query part.

public

addNotBetween(searchField: string, start: number, end: number): *

Add NOT BETWEEN criteria to the query part.

public

addNotEqual(searchField: string, value: any): *

Add a NOT EQUAL criteria to the query part.

public

addNotInside(searchField: string, values: array): *

Add a NOT INSIDE criteria to the query part.

public

addNotLeftLike(searchField: string, value: any): *

Add a NOT LEFT LIKE criteria to the query part.

public

addNotLike(searchField: string, value: any): *

Add a NOT LIKE criteria to the query part.

public

addNotRightLike(searchField: string, value: any): *

Add a NOT RIGHT LIKE criteria to the query part.

public

addRightLike(searchField: string, value: any): *

Add a RIGHT LIKE criteria to the query part.

Public Methods

public addBetween(searchField: string, start: number, end: number): * source

Add BETWEEN criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare start and end against with a BETWEEN statement.

start number

All documents that are returned must have the search field set to a number greater than or equal to this start.

end number

All documents that are returned must have the search field set to a number less than or equal to this end.

Return:

*

public addEqual(searchField: string, value: any): * source

Add a EQUAL criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare with an EQUAL statement.

value any

Search field's value for the EQUAL criteria.

Return:

*

public addGreaterThan(searchField: string, value: number): * source

Add GREATER THAN criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare with a GREATER THAN statement.

value number

All documents returned must have the search field set to a number greater than this value.

Return:

*

public addGreaterThanOrEqual(searchField: string, value: number): * source

Add GREATER THAN OR EQUAL criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare with a GREATER THAN OR EQUAL statement.

value number

All documents returned must have the search field set to a number greater than or equal to this value.

Return:

*

public addInside(searchField: string, values: array): * source

Add a INSIDE criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare with an INSIDE statement.

values array

An non-empty list of numbers, booleans, and/or strings. All documents where the search field is one of the values in the list.

Return:

*

public addLeftLike(searchField: string, value: any): * source

Add a LEFT LIKE criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare start and end against with a LEFT LIKE statement.

value any

Search field's value for the LEFT LIKE criteria.

Return:

*

public addLessThan(searchField: string, value: number): * source

Add LESS THAN criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare with a LESS THAN statement.

value number

All documents returned must have the search field set to a number less than this value.

Return:

*

public addLessThanOrEqual(searchField: string, value: number): * source

Add LESS THAN OR EQUAL criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare with a LESS THAN OR EQUAL statement.

value number

All documents returned must have the search field set to a number less or equal than this value.

Return:

*

public addLike(searchField: string, value: any): * source

Add a LIKE criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare with a LIKE statement.

value any

Search field's value for the LIKE criteria.

Return:

*

public addNotBetween(searchField: string, start: number, end: number): * source

Add NOT BETWEEN criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare start and end against with a NOT BETWEEN statement.

start number

All documents that are returned must have the search field set to a number greater than or equal to this start.

end number

All documents that are returned must have the search field set to a number less than or equal to this end.

Return:

*

public addNotEqual(searchField: string, value: any): * source

Add a NOT EQUAL criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare with a NOT EQUAL statement.

value any

Search field's value for the NOT EQUAL criteria.

Return:

*

public addNotInside(searchField: string, values: array): * source

Add a NOT INSIDE criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare with a NOT INSIDE statement.

values array

An non-empty list of numbers, booleans, and/or strings. All matching documents must not match the search field to one of the values in the list.

Return:

*

public addNotLeftLike(searchField: string, value: any): * source

Add a NOT LEFT LIKE criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare start and end against with a NOT LEFT LIKE statement.

value any

Search field's value for the NOT LEFT LIKE criteria.

Return:

*

public addNotLike(searchField: string, value: any): * source

Add a NOT LIKE criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare start and end against with a NOT LIKE statement.

value any

Search field's value for the NOT LIKE criteria.

Return:

*

public addNotRightLike(searchField: string, value: any): * source

Add a NOT RIGHT LIKE criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare start and end against with a NOT RIGHT LIKE statement.

value any

Search field's value for the NOT RIGHT LIKE criteria.

Return:

*

public addRightLike(searchField: string, value: any): * source

Add a RIGHT LIKE criteria to the query part.

Params:

NameTypeAttributeDescription
searchField string

The search field to compare start and end against with a RIGHT LIKE statement.

value any

Search field's value for the RIGHT LIKE criteria.

Return:

*