#import <CBQuery.h>
Instance Methods | |
(CBQuery *) | - initWithCollectionID: |
(void) | - setCollectionID: |
(void) | - fetchWithSuccessCallback:ErrorCallback: |
(void) | - updateWithChanges:SuccessCallback:ErrorCallback: |
(void) | - removeWithSuccessCallback:ErrorCallback: |
(CBQuery *) | - equalTo:for: |
(CBQuery *) | - notEqualTo:for: |
(CBQuery *) | - greaterThan:for: |
(CBQuery *) | - lessThan:for: |
(CBQuery *) | - greaterThanEqualTo:for: |
(CBQuery *) | - lessThanEqualTo:for: |
Properties | |
NSMutableDictionary * | query |
NSMutableArray * | OR |
NSString * | collectionID |
Class representing a query that can be used in operations on Platform
- (CBQuery *) equalTo: | (NSString *) | value | |
for: | (NSString *) | key | |
Creates an equality clause and adds it to the query
value | A string that gets set as the value for the given key |
key | A string that is used as the key for the given value |
- (void) fetchWithSuccessCallback: | (NSMutableArray *) | successCallback | |
ErrorCallback: | (NSError *, __strong id) | failureCallback | |
Fetches from a collection all of the items that match the query that is sent.
successCallback | A callback block that handles the returned data |
failureCallback | A callback block that handles errors returned |
- (CBQuery *) greaterThan: | (NSString *) | value | |
for: | (NSString *) | key | |
Creates a greater than clause and adds it to the query
value | A string that gets set as the value for the given key |
key | A string that is used as the key for the given value |
- (CBQuery *) greaterThanEqualTo: | (NSString *) | value | |
for: | (NSString *) | key | |
Creates a greater than or equal to clause and adds it to the query
value | A string that gets set as the value for the given key |
key | A string that is used as the key for the given value |
- (CBQuery *) initWithCollectionID: | (NSString *) | colID |
Initializes the query object and sets the collectionID
colID | A string that is set as collectionID |
- (CBQuery *) lessThan: | (NSString *) | value | |
for: | (NSString *) | key | |
Creates a less than clause and adds it to the query
value | A string that gets set as the value for the given key |
key | A string that is used as the key for the given value |
- (CBQuery *) lessThanEqualTo: | (NSString *) | value | |
for: | (NSString *) | key | |
Creates a less than or equal to clause and adds it to the query
value | A string that gets set as the value for the given key |
key | A string that is used as the key for the given value |
- (CBQuery *) notEqualTo: | (NSString *) | value | |
for: | (NSString *) | key | |
Creates an inequality clause and adds it to the query
value | A string that gets set as the value for the given key |
key | A string that is used as the key for the given value |
- (void) removeWithSuccessCallback: | (NSMutableArray *) | successCallback | |
ErrorCallback: | (NSError *, __strong id) | failureCallback | |
Remove from the platform all of the items that match the query sent
successCallback | A callback block that handles the returned data |
failureCallback | A callback block that handles the errors returned |
- (void) setCollectionID: | (NSString *) | colID |
Sets the collection ID attribute
colID | A string that will be set as the Collection ID |
- (void) updateWithChanges: | (NSMutableDictionary *) | changes | |
SuccessCallback: | (NSMutableArray *) | successCallback | |
ErrorCallback: | (NSError *, __strong id) | failureCallback | |
Updates on the platform all the items that match the query sent
changes | A dictoinary of all the changes that will be applied to the items that match the query |
successCallback | A callback block that handles the returned data |
failureCallback | A callback block that handles the errors returned |
|
readwritenonatomicstrong |
The string that represent the ID of the collection that will be queried
|
readwritenonatomicstrong |
An array of query objects that is used when you create an or statement and combine two queries.
|
readwritenonatomicstrong |
A dictonary that holds the keys and values that make up the query