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

#import <CBQuery.h>

Inheritance diagram for CBQuery:

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
 

Detailed Description

Class representing a query that can be used in operations on Platform

Method Documentation

- (CBQuery *) equalTo: (NSString *)  value
for: (NSString *)  key 

Creates an equality clause and adds it to the query

Parameters
valueA string that gets set as the value for the given key
keyA string that is used as the key for the given value
Returns
The query with the new clause added
- (void) fetchWithSuccessCallback: (NSMutableArray *)  successCallback
ErrorCallback: (NSError *, __strong id)  failureCallback 

Fetches from a collection all of the items that match the query that is sent.

Parameters
successCallbackA callback block that handles the returned data
failureCallbackA callback block that handles errors returned
- (CBQuery *) greaterThan: (NSString *)  value
for: (NSString *)  key 

Creates a greater than clause and adds it to the query

Parameters
valueA string that gets set as the value for the given key
keyA string that is used as the key for the given value
Returns
The query with the new clause added
- (CBQuery *) greaterThanEqualTo: (NSString *)  value
for: (NSString *)  key 

Creates a greater than or equal to clause and adds it to the query

Parameters
valueA string that gets set as the value for the given key
keyA string that is used as the key for the given value
Returns
The query with the new clause added
- (CBQuery *) initWithCollectionID: (NSString *)  colID

Initializes the query object and sets the collectionID

Parameters
colIDA string that is set as collectionID
Returns
the newly instantiated CBQuery Object
- (CBQuery *) lessThan: (NSString *)  value
for: (NSString *)  key 

Creates a less than clause and adds it to the query

Parameters
valueA string that gets set as the value for the given key
keyA string that is used as the key for the given value
Returns
The query with the new clause added
- (CBQuery *) lessThanEqualTo: (NSString *)  value
for: (NSString *)  key 

Creates a less than or equal to clause and adds it to the query

Parameters
valueA string that gets set as the value for the given key
keyA string that is used as the key for the given value
Returns
The query with the new clause added
- (CBQuery *) notEqualTo: (NSString *)  value
for: (NSString *)  key 

Creates an inequality clause and adds it to the query

Parameters
valueA string that gets set as the value for the given key
keyA string that is used as the key for the given value
Returns
The query with the new clause added
- (void) removeWithSuccessCallback: (NSMutableArray *)  successCallback
ErrorCallback: (NSError *, __strong id)  failureCallback 

Remove from the platform all of the items that match the query sent

Parameters
successCallbackA callback block that handles the returned data
failureCallbackA callback block that handles the errors returned
- (void) setCollectionID: (NSString *)  colID

Sets the collection ID attribute

Parameters
colIDA 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

Parameters
changesA dictoinary of all the changes that will be applied to the items that match the query
successCallbackA callback block that handles the returned data
failureCallbackA callback block that handles the errors returned

Property Documentation

- (NSString*) collectionID
readwritenonatomicstrong

The string that represent the ID of the collection that will be queried

- (NSMutableArray*) OR
readwritenonatomicstrong

An array of query objects that is used when you create an or statement and combine two queries.

- (NSMutableDictionary*) query
readwritenonatomicstrong

A dictonary that holds the keys and values that make up the query


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