#import <CBCollection.h>
Class for dealing with ClearBlade Platform Collections.
- (void) createWithData: |
|
(NSMutableDictionary *) |
data |
WithSuccessCallback: |
|
(CBItem *) |
successCallback |
ErrorCallback: |
|
(NSError *, __strong id) |
failureCallback |
|
|
| |
Creates a new Item in the collection in the Platform. This creates a new item on the server.
- Parameters
-
data | A Dictionary that contains the object that you want the item in the platform to represent |
successCallback | Callback Block to handle successfully returned data |
failureCallback | Callback Block to handle errors returned |
- (void) fetchWithQuery: |
|
(CBQuery*) |
query |
SuccessCallback: |
|
(NSMutableArray *) |
successCallback |
ErrorCallback: |
|
(NSError *, __strong id) |
failureCallback |
|
|
| |
Fetches all data from the collection that matches a particular query
- Parameters
-
query | A CBQuery object that defines what you want returned from the Platform |
successCallback | Callback Block to handle successfully returned data |
failureCallback | Callback Block to handle errors returned |
- (void) fetchWithSuccessCallback: |
|
(NSMutableArray *) |
successCallback |
ErrorCallback: |
|
(NSError *, __strong id) |
failureCallback |
|
|
| |
Fetches the entire collection from the Platform. The returned data will be returned to the block you provide
- Parameters
-
successCallback | Callback Block to handle successfully returned data |
failureCallback | Callback Block to handle errors returned |
- (id) initWithCollectionID: |
|
(NSString *) |
colID |
|
Initial value:{
Definition: CBHTTPClient.h:16
Initialize a new CBCollection object
- Parameters
-
colID | The string that will be used to identify the collection on the server |
- Returns
- a newly initialized object
- (void) removeWithQuery: |
|
(CBQuery*) |
query |
SuccessCallback: |
|
(NSMutableArray *) |
successCallback |
ErrorCallback: |
|
(NSError *, __strong id) |
failureCallback |
|
|
| |
Removes an item or a set of items on the Platform that match the given query.
- Parameters
-
query | A CBQuery object that defines what you want removed from the Platform |
successCallback | Callback Block to handle successfully returned data |
failureCallback | Callback Block to handle errors returned |
- (void) updateWithQuery: |
|
(CBQuery *) |
query |
WithChanges: |
|
(NSMutableDictionary *) |
changes |
SuccessCallback: |
|
(NSMutableArray *) |
successCallback |
ErrorCallback: |
|
(NSError *, __strong id) |
failureCallback |
|
|
| |
Updates an item or a set of items on the Platform that match the given query.
- Parameters
-
query | A CBQuery object that defines what you want updated on the Platform |
changes | A Dictionary containing all of the changes that you want to make on items that match the query. |
successCallback | Callback Block to handle successfully returned data |
failureCallback | Callback Block to handle errors returned |
- (NSString*) collectionID |
|
readwritenonatomicstrong |
The string that represents the collection ID.
The documentation for this class was generated from the following files: