KiiQuery Class Reference
Inherits from | NSObject |
Declared in | KiiQuery.h |
Overview
A class to handle queries against the data store.
This class gives an application the opportunity to query the server for a refined set of results. A query must be initialized with a collection (class) to query against, can be composed of various attributes, and must contain a KiiClause for its main definition.
Tasks
-
sortField
property -
limit
property -
sortDescending
property -
+ queryWithClause:
-
+ queryWithDictionary:
-
– sortByDesc:
-
– sortByAsc:
Properties
limit
The maximum number of items to be returned This limit behaves in a best effort way. Actual number of the items in the response could be smaller than the limit. (But never exceeds.) If the specified limit is greater than the limit of the server or limit is 0, limit of the server will be applied.
@property (nonatomic, assign) unsigned int limit
Discussion
The maximum number of items to be returned This limit behaves in a best effort way. Actual number of the items in the response could be smaller than the limit. (But never exceeds.) If the specified limit is greater than the limit of the server or limit is 0, limit of the server will be applied.
Declared In
KiiQuery.h
Class Methods
queryWithClause:
Create a KiiQuery object based on a KiiClause
+ (KiiQuery *)queryWithClause:(nullable KiiClause *)clause
Parameters
- clause
The KiiClause to be executed with the query
Discussion
Create a KiiQuery object based on a KiiClause
By passing nil as the ‘clause’ parameter, all objects can be retrieved.
Declared In
KiiQuery.h
queryWithDictionary:
Create KiiQuery from Dictionary
+ (KiiQuery *)queryWithDictionary:(nullable NSDictionary *)queryDict
Parameters
- queryDict
Dictionary represents query. Should be equivalent to JSON object constructed for query REST api.
Return Value
KiiQuery instance
Discussion
Create KiiQuery from Dictionary
You may not use this method.
This is introduced for internal use.
Declared In
KiiQuery.h