Home Reference Source
public class | source

JSONStoreQuery

This class represents a group of query part objects that are joined with an OR statement.

Method Summary

Public Methods
public

Add a JSONStoreQueryPart object to the list of queries.

public

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:

NameTypeAttributeDescription
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.

Return:

Promise<Array>

A list of all query parts in the query content.

Example:

[
 {
     value: "[21, 50]", 
     operation: "BETWEEN", 
     isKeySpecial: false, 
     key: "age"
 },
 {
     value: "[20000, 40000]",
     operation: "BETWEEN", 
     isKeySpecial: false, 
     key: "salary"
 }
]