VaultMobileSDK  18R3
iOS framework for Vault API
Class Methods | List of all members
VEVVaultLocalQuery Class Reference

Instances of this class are used to define queries on a VEVVaultJSONCache. More...

Inherits NSObject.

Class Methods

(instancetype) + createWithExpression:
 Creates an instance of a VEVVaultLocalQuery from a list of VEVVaultQueryCriteria and VEVVaultLogicalOperators. The first and last elements of the list must be VEVVaultQueryCriteria and each pair of VEVVaultQueryCriteria instances must be separated by a VEVVaultLogicalOperator. More...
 

Detailed Description

Instances of this class are used to define queries on a VEVVaultJSONCache.

Cache queries are performed by constructing a VEVVaultLocalQuery object from one or more VEVVaultQueryCriteria, and passing the query to query:handler: (VEVVaultJSONCache). The process overall is meant to correspond closely with writing directly in a query language, as the following example demonstrates:

let query = VEVVaultLocalQuery.create(withExpression: [
    VEVVaultQueryCriteria(field: "name__v", like: "Pleasanton"),
    VEVVaultLogicalOperatorAnd,
    VEVVaultQueryCriteria(field: "pages__v", equalTo: @2)])

documentsJsonCache.query(localQuery, handler: { (entries, error) in
    print("JsonCacheEntries \(entries)")
})
See also
- query:handler: (VEVVaultJSONCache).

Method Documentation

◆ createWithExpression:()

+ (instancetype) createWithExpression: (NSArray< id > *_Nullable)  expressionComponents

Creates an instance of a VEVVaultLocalQuery from a list of VEVVaultQueryCriteria and VEVVaultLogicalOperators. The first and last elements of the list must be VEVVaultQueryCriteria and each pair of VEVVaultQueryCriteria instances must be separated by a VEVVaultLogicalOperator.

See also
VEVVaultQueryCriteria
VEVVaultLogicalOperator

The documentation for this class was generated from the following file: