import {JSONStoreQuery} from 'react-native-ibm-jsonstore/js/JSONStoreQuery.js'
JSONStoreQuery
This class represents a group of query part objects that are joined with an OR statement.
Method Summary
Public Methods | ||
public |
addQueryPart(queryPart: JSONStoreQueryPart) Add a JSONStoreQueryPart object to the list of queries. |
|
public |
async getAllQueryParts(): Promise<Array> Retrieve the current list of query part objects in this query group. |
Public Methods
public addQueryPart(queryPart: JSONStoreQueryPart) source
Add a JSONStoreQueryPart object to the list of queries.
Params:
Name | Type | Attribute | Description |
queryPart | JSONStoreQueryPart | A query part that should be included in the query. All query parts are ORed together. For example, when adding query part A and query part B to the query content, the final query will be A OR B. |
public async getAllQueryParts(): Promise<Array> source
Retrieve the current list of query part objects in this query group.
Example:
[
{
value: "[21, 50]",
operation: "BETWEEN",
isKeySpecial: false,
key: "age"
},
{
value: "[20000, 40000]",
operation: "BETWEEN",
isKeySpecial: false,
key: "salary"
}
]