MSTableOperation Class Reference

Inherits from NSObject
Declared in MSTableOperation.h

Overview

The MSTableOperation object represents a pending operation that was created by an earlier call using the MSSyncTable object. This is a wrapper to facilitae sending the operation to the server, handling any errors, and getting the appropriate local versions updated on completion

Properties

  type

The action that should be taken for this table item, for example insert or update.

@property (nonatomic, readonly) MSTableOperationTypes type

Discussion

The action that should be taken for this table item, for example insert or update.

Declared In

MSTableOperation.h

  tableName

The name of the table associated with the item

@property (nonatomic, copy, readonly, nonnull) NSString *tableName

Discussion

The name of the table associated with the item

Declared In

MSTableOperation.h

  itemId

The Id of the item the operation should run on.

@property (nonatomic, copy, readonly, nonnull) NSString *itemId

Discussion

The Id of the item the operation should run on.

Declared In

MSTableOperation.h

  item

The item that will be sent to the server when execute is called.

@property (nonatomic, strong, nullable) NSDictionary *item

Discussion

The item that will be sent to the server when execute is called.

Declared In

MSTableOperation.h

Sending an operation to the Mobile Service

– executeWithCompletion:

Perform’s the associated PushOperationType (insert, etc) for the table item. The callback will be passed the result (an item on insert/update, and the string id on a delete) or the error from the mobile service.

- (void)executeWithCompletion:(nullable void ( ^ ) ( id __nonnull itemOrItemId , NSError *__nullable error ))completion

Discussion

Perform’s the associated PushOperationType (insert, etc) for the table item. The callback will be passed the result (an item on insert/update, and the string id on a delete) or the error from the mobile service.

Declared In

MSTableOperation.h

Canceling a Push operation

– cancelPush

- (void)cancelPush