Reference Source
import JSONStoreFindOptions from 'react-native-ibm-mobilefirst-jsonstore'
public class | source

JSONStoreFindOptions

Options that are used to modify the find operation in JSONStoreCollection.

Constructor Summary

Public Constructor
public

constructor(limit: number, offset: number, filters: Array, sortAscending: Array, sortDescending: Array)

Member Summary

Public Members
public
public
public
public
public

Method Summary

Public Methods
public

addFilter(filterField: string)

Add a search filter to the existing list of search fields.

public

addSortAscending(sortField: string)

Add a new search field by which the results will be sorted.

public

Add a new search field by which the results will be sorted.

Public Constructors

public constructor(limit: number, offset: number, filters: Array, sortAscending: Array, sortDescending: Array) source

Params:

NameTypeAttributeDescription
limit number
  • optional

The maximum number of results to be returned.

offset number
  • optional

The offset of which results will begin.

filters Array
  • optional

The search fields to be returned on the results of the find operation.

sortAscending Array
  • optional

The search fields by which the results will be sorted in ascending order.

sortDescending Array
  • optional

The search fields by which the results will be sorted in descending order.

Public Members

public filters: Array source

public limit: number source

public offset: number source

public sortAscending: Array source

public sortDescending: Array source

Public Methods

public addFilter(filterField: string) source

Add a search filter to the existing list of search fields.

Params:

NameTypeAttributeDescription
filterField string

The search field to Filter

public addSortAscending(sortField: string) source

Add a new search field by which the results will be sorted. The search field will sort the results in a ascending manner against the search field. Note that it will be sorted in the order that they were added. For example, if you add searchField1 and then searchField2, it will sort according to searchField1, and then any ties will be sorted according to searchField2.

Params:

NameTypeAttributeDescription
sortField string

The search field that is used for a ascending sort.

public addSortDescending(sortField: string) source

Add a new search field by which the results will be sorted. The search field will sort the results in a descending manner against the search field. Please note that it will be sorted in the order that they were added. For example, if you add searchField1 and then searchField2, it will sort according to searchField1, and then any ties will be sorted according to searchField2.

Params:

NameTypeAttributeDescription
sortField string

The search field that is used for a descending sort.