MSTable Class Reference

Inherits from NSObject
Declared in MSTable.h

Overview

The MSTable class represents a table of a Windows Azure Mobile Service. The MSTable class represents a table of a Microsoft Azure Mobile Service. Items can be inserted, updated, deleted and read from the table. The table can also be queried to retrieve an array of items that meet the given query conditions. All table operations result in a request to the Windows Azure conditions. All table operations result in a request to the Microsoft Azure Mobile Service to perform the given operation.

Properties

  name

The name of this table.

@property (nonatomic, copy, readonly) NSString *name

Discussion

The name of this table.

Declared In

MSTable.h

  client

The client associated with this table.

@property (nonatomic, strong, readonly) MSClient *client

Discussion

The client associated with this table.

Declared In

MSTable.h

  systemProperties

@property (nonatomic) MSSystemProperties systemProperties

Initializing the MSTable Object

– initWithName:client:

Initializes an MSTable instance with the given name and client.

- (id)initWithName:(NSString *)tableName client:(MSClient *)client

Discussion

Initializes an MSTable instance with the given name and client.

Declared In

MSTable.h

Modifying Items

– insert:completion:

Sends a request to the Microsoft Azure Mobile Service to insert the given item into the table. The item must not have an id.

- (void)insert:(NSDictionary *)item completion:(MSItemBlock)completion

Discussion

Sends a request to the Microsoft Azure Mobile Service to insert the given item into the table. The item must not have an id.

Declared In

MSTable.h

– insert:parameters:completion:

Sends a request to the Microsoft Azure Mobile Service to insert the given item into the table. Addtional user-defined parameters are sent in the request query string. The item must not have an id.

- (void)insert:(NSDictionary *)item parameters:(NSDictionary *)parameters completion:(MSItemBlock)completion

Discussion

Sends a request to the Microsoft Azure Mobile Service to insert the given item into the table. Addtional user-defined parameters are sent in the request query string. The item must not have an id.

Declared In

MSTable.h

– update:completion:

Sends a request to the Microsoft Azure Mobile Service to update the given item in the table. The item must have an id.

- (void)update:(NSDictionary *)item completion:(MSItemBlock)completion

Discussion

Sends a request to the Microsoft Azure Mobile Service to update the given item in the table. The item must have an id.

Declared In

MSTable.h

– update:parameters:completion:

Sends a request to the Microsoft Azure Mobile Service to update the given item in the table. Addtional user-defined parameters are sent in the request query string. The item must have an id.

- (void)update:(NSDictionary *)item parameters:(NSDictionary *)parameters completion:(MSItemBlock)completion

Discussion

Sends a request to the Microsoft Azure Mobile Service to update the given item in the table. Addtional user-defined parameters are sent in the request query string. The item must have an id.

Declared In

MSTable.h

– delete:completion:

Sends a request to the Microsoft Azure Mobile Service to delete the given item from the table. The item must have an id.

- (void)delete:(NSDictionary *)item completion:(MSDeleteBlock)completion

Discussion

Sends a request to the Microsoft Azure Mobile Service to delete the given item from the table. The item must have an id.

Declared In

MSTable.h

– delete:parameters:completion:

Sends a request to the Microsoft Azure Mobile Service to delete the given item from the table. Addtional user-defined parameters are sent in the request query string. The item must have an id.

- (void)delete:(NSDictionary *)item parameters:(NSDictionary *)parameters completion:(MSDeleteBlock)completion

Discussion

Sends a request to the Microsoft Azure Mobile Service to delete the given item from the table. Addtional user-defined parameters are sent in the request query string. The item must have an id.

Declared In

MSTable.h

– deleteWithId:completion:

Sends a request to the Microsoft Azure Mobile Service to delete the item with the given id in from table.

- (void)deleteWithId:(id)itemId completion:(MSDeleteBlock)completion

Discussion

Sends a request to the Microsoft Azure Mobile Service to delete the item with the given id in from table.

Declared In

MSTable.h

– deleteWithId:parameters:completion:

Sends a request to the Microsoft Azure Mobile Service to delete the item with the given id in from table. Addtional user-defined parameters are sent in the request query string.

- (void)deleteWithId:(id)itemId parameters:(NSDictionary *)parameters completion:(MSDeleteBlock)completion

Discussion

Sends a request to the Microsoft Azure Mobile Service to delete the item with the given id in from table. Addtional user-defined parameters are sent in the request query string.

Declared In

MSTable.h

– undelete:completion:

Sends a request to the Azure Mobile Service to undelete the item with the given id in from table.

- (void)undelete:(NSDictionary *)item completion:(MSItemBlock)completion

Discussion

Sends a request to the Azure Mobile Service to undelete the item with the given id in from table.

Declared In

MSTable.h

– undelete:parameters:completion:

Sends a request to the Azure Mobile Service to undelete the item with the given id in from table. Addtional user-defined parameters are sent in the request query string.

- (void)undelete:(NSDictionary *)item parameters:(NSDictionary *)parameters completion:(MSItemBlock)completion

Discussion

Sends a request to the Azure Mobile Service to undelete the item with the given id in from table. Addtional user-defined parameters are sent in the request query string.

Declared In

MSTable.h

Retreiving Items

– readWithId:completion:

Sends a request to the Microsoft Azure Mobile Service to return the item with the given id from the table.

- (void)readWithId:(id)itemId completion:(MSItemBlock)completion

Discussion

Sends a request to the Microsoft Azure Mobile Service to return the item with the given id from the table.

Declared In

MSTable.h

– readWithId:parameters:completion:

Sends a request to the Microsoft Azure Mobile Service to return the item with the given id from the table. Addtional user-defined parameters are sent in the request query string.

- (void)readWithId:(id)itemId parameters:(NSDictionary *)parameters completion:(MSItemBlock)completion

Discussion

Sends a request to the Microsoft Azure Mobile Service to return the item with the given id from the table. Addtional user-defined parameters are sent in the request query string.

Declared In

MSTable.h

– readWithQueryString:completion:

Sends a request to the Microsoft Azure Mobile Service to return all items fromm the table that meet the conditions of the given query. You can also use a URI in place of queryString to fetch results from a URI e.g. result.nextLink gives you URI to next page of results for a query that you can pass here.

- (void)readWithQueryString:(NSString *)queryString completion:(MSReadQueryBlock)completion

Discussion

Sends a request to the Microsoft Azure Mobile Service to return all items fromm the table that meet the conditions of the given query. You can also use a URI in place of queryString to fetch results from a URI e.g. result.nextLink gives you URI to next page of results for a query that you can pass here.

Declared In

MSTable.h

– readWithCompletion:

Sends a request to the Microsoft Azure Mobile Service to return all items from the table. The Microsoft Azure Mobile Service will apply a default limit to the number of items returned.

- (void)readWithCompletion:(MSReadQueryBlock)completion

Discussion

Sends a request to the Microsoft Azure Mobile Service to return all items from the table. The Microsoft Azure Mobile Service will apply a default limit to the number of items returned.

Declared In

MSTable.h

– readWithPredicate:completion:

Sends a request to the Microsoft Azure Mobile Service to return all items from the table that meet the conditions of the given predicate.

- (void)readWithPredicate:(NSPredicate *)predicate completion:(MSReadQueryBlock)completion

Discussion

Sends a request to the Microsoft Azure Mobile Service to return all items from the table that meet the conditions of the given predicate.

Declared In

MSTable.h

– query

Returns an MSQuery instance associated with the table that can be configured and then executed to retrieve items from the table. An MSQuery instance provides more flexibilty when querying a table than the table read* methods.

- (MSQuery *)query

Discussion

Returns an MSQuery instance associated with the table that can be configured and then executed to retrieve items from the table. An MSQuery instance provides more flexibilty when querying a table than the table read* methods.

Declared In

MSTable.h

– queryWithPredicate:

Returns an MSQuery instance associated with the table that uses the given predicate. An MSQuery instance provides more flexibilty when querying a table than the table read* methods.

- (MSQuery *)queryWithPredicate:(NSPredicate *)predicate

Discussion

Returns an MSQuery instance associated with the table that uses the given predicate. An MSQuery instance provides more flexibilty when querying a table than the table read* methods.

Declared In

MSTable.h