KiiThingQueryResult Class Reference
Inherits from | NSObject |
Declared in | KiiThingQueryResult.h |
Overview
Class to represent result of KiiThingQuery execution. This Class should not be instantiated programatically.
Tasks
-
hasNext
property -
results
property -
nextThingQuery
property -
– getNextResultSynchronous:
-
– getNextResult:
Properties
hasNext
When there are many result of query or data in result is large, Query result would be divided into several pages. It returns YES if there are pending result of the Query to be retrieved, NO otherwise.
@property (nonatomic, readonly) BOOL hasNext
Discussion
When there are many result of query or data in result is large, Query result would be divided into several pages. It returns YES if there are pending result of the Query to be retrieved, NO otherwise.
Declared In
KiiThingQueryResult.h
nextThingQuery
Return KiiThingQuery to get next page of the query. Nil when this result is the last part of the query.
@property (nonatomic, readonly, nullable) KiiThingQuery *nextThingQuery
Discussion
Return KiiThingQuery to get next page of the query. Nil when this result is the last part of the query.
Declared In
KiiThingQueryResult.h
Instance Methods
getNextResult:
Asynchronously fetch the query result of next page and update array of data can get by [KiiThingQueryResult results]
same as calling [KiiThing querySynchronous:] with the query get by
- (void)getNextResult:(KiiThingQueryResultBlock _Nonnull)block
Parameters
- block
The block to be called upon method completion. See example.
Discussion
Asynchronously fetch the query result of next page and update array of data can get by [KiiThingQueryResult results]
same as calling [KiiThing querySynchronous:] with the query get by
[aThingQueryResult getNextResult:^(KiiThingQueryResult *queryResult, NSError *error){
//print the executed query
if(error == nil) {
NSLog(@"Got Results: %@", queryResult.results);
NSLog(@"Total result %@", queryResult.results.count);
NSLog(@"Has Next: %@ next", queryResult.hasNext?@"Yes":@"No");
}
}];
Declared In
KiiThingQueryResult.h
getNextResultSynchronous:
Synchronously fetch the query result of next page and update array of data can get by [KiiThingQueryResult results]
same as calling [KiiThing querySynchronous:] with the query get by
- (KiiThingQueryResult *_Nullable)getNextResultSynchronous:(NSError *_Nullable *_Nullable)error
Parameters
- error
used to return an error by reference (pass NULL if this is not desired). It is recommended to set an actual error object to get the error information.
Return Value
Thing query result.
Discussion
Synchronously fetch the query result of next page and update array of data can get by [KiiThingQueryResult results]
same as calling [KiiThing querySynchronous:] with the query get by
This is a blocking methods.
Declared In
KiiThingQueryResult.h