My Project
 All Classes Functions Properties
Instance Methods | Properties | List of all members
CBCollection Class Reference

#import <CBCollection.h>

Inheritance diagram for CBCollection:

Instance Methods

(id) - initWithCollectionID:
 
(void) - fetchWithSuccessCallback:ErrorCallback:
 
(void) - fetchWithQuery:SuccessCallback:ErrorCallback:
 
(void) - createWithData:WithSuccessCallback:ErrorCallback:
 
(void) - updateWithQuery:WithChanges:SuccessCallback:ErrorCallback:
 
(void) - removeWithQuery:SuccessCallback:ErrorCallback:
 

Properties

NSString * collectionID
 

Detailed Description

Class for dealing with ClearBlade Platform Collections.

Method Documentation

- (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
dataA Dictionary that contains the object that you want the item in the platform to represent
successCallbackCallback Block to handle successfully returned data
failureCallbackCallback 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
queryA CBQuery object that defines what you want returned from the Platform
successCallbackCallback Block to handle successfully returned data
failureCallbackCallback 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
successCallbackCallback Block to handle successfully returned data
failureCallbackCallback Block to handle errors returned
- (id) initWithCollectionID: (NSString *)  colID
Initial value:
{
CBHTTPClient *cbClient
Definition: CBHTTPClient.h:16

Initialize a new CBCollection object

Parameters
colIDThe 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
queryA CBQuery object that defines what you want removed from the Platform
successCallbackCallback Block to handle successfully returned data
failureCallbackCallback 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
queryA CBQuery object that defines what you want updated on the Platform
changesA Dictionary containing all of the changes that you want to make on items that match the query.
successCallbackCallback Block to handle successfully returned data
failureCallbackCallback Block to handle errors returned

Property Documentation

- (NSString*) collectionID
readwritenonatomicstrong

The string that represents the collection ID.


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