TableBatchOperation TableBatchOperation TableBatchOperation Class

Definition

Represents a batch operation on a table.

public sealed class TableBatchOperation : System.Collections.Generic.ICollection<Microsoft.WindowsAzure.Storage.Table.TableOperation>, System.Collections.Generic.IEnumerable<Microsoft.WindowsAzure.Storage.Table.TableOperation>, System.Collections.Generic.IList<Microsoft.WindowsAzure.Storage.Table.TableOperation>
type TableBatchOperation = class
    interface IList<TableOperation>
    interface ICollection<TableOperation>
    interface seq<TableOperation>
    interface IEnumerable
Public NotInheritable Class TableBatchOperation
Implements ICollection(Of TableOperation), IEnumerable(Of TableOperation), IList(Of TableOperation)
Inheritance
TableBatchOperationTableBatchOperationTableBatchOperation
Implements

Remarks

A batch operation is a collection of table operations which are executed by the Storage Service REST API as a single atomic operation, by invoking an Entity Group Transaction.

A batch operation may contain up to 100 individual table operations, with the requirement that each operation entity must have same partition key. A batch with a retrieve operation cannot contain any other operations. Note that the total payload of a batch operation is limited to 4MB.

Constructors

TableBatchOperation() TableBatchOperation() TableBatchOperation()

Initializes a new instance of the TableBatchOperation class.

Properties

Count Count Count

Gets the number of operations in this TableBatchOperation.

IsReadOnly IsReadOnly IsReadOnly

Gets a value indicating whether the TableBatchOperation is read-only.

Item[Int32] Item[Int32] Item[Int32]

Gets or sets the TableOperation item at the specified index.

Methods

Add(TableOperation) Add(TableOperation) Add(TableOperation)

Adds the TableOperation to the TableBatchOperation.

Clear() Clear() Clear()

Clears all TableOperation objects from the TableBatchOperation.

Contains(TableOperation) Contains(TableOperation) Contains(TableOperation)

Returns true if this TableBatchOperation contains the specified element.

CopyTo(TableOperation[], Int32) CopyTo(TableOperation[], Int32) CopyTo(TableOperation[], Int32)

Copies all the elements of the TableBatchOperation to the specified one-dimensional array starting at the specified destination array index.

Delete(ITableEntity) Delete(ITableEntity) Delete(ITableEntity)

Adds a TableOperation to the TableBatchOperation that deletes the specified entity from a table.

GetEnumerator() GetEnumerator() GetEnumerator()

Returns an IEnumerator<T> for the TableBatchOperation.

IndexOf(TableOperation) IndexOf(TableOperation) IndexOf(TableOperation)

Returns the zero-based index of the first occurrence of the specified TableOperation item, or -1 if the TableBatchOperation does not contain the item.

Insert(ITableEntity, Boolean) Insert(ITableEntity, Boolean) Insert(ITableEntity, Boolean)

Adds a TableOperation object that inserts the specified entity into the table as part of the batch operation.

Insert(Int32, TableOperation) Insert(Int32, TableOperation) Insert(Int32, TableOperation)

Inserts a TableOperation into the TableBatchOperation at the specified index.

Insert(ITableEntity) Insert(ITableEntity) Insert(ITableEntity)

Adds a TableOperation to the TableBatchOperation that inserts the specified entity into a table.

InsertOrMerge(ITableEntity) InsertOrMerge(ITableEntity) InsertOrMerge(ITableEntity)

Adds a TableOperation to the TableBatchOperation that inserts the specified entity into a table if the entity does not exist; if the entity does exist then its contents are merged with the provided entity.

InsertOrReplace(ITableEntity) InsertOrReplace(ITableEntity) InsertOrReplace(ITableEntity)

Adds a TableOperation to the TableBatchOperation that inserts the specified entity into a table if the entity does not exist; if the entity does exist then its contents are replaced with the provided entity.

Merge(ITableEntity) Merge(ITableEntity) Merge(ITableEntity)

Adds a TableOperation to the TableBatchOperation that merges the contents of the specified entity with the existing entity in a table.

Remove(TableOperation) Remove(TableOperation) Remove(TableOperation)

Removes the specified TableOperation item from the TableBatchOperation.

RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

Removes the TableOperation at the specified index from the TableBatchOperation.

Replace(ITableEntity) Replace(ITableEntity) Replace(ITableEntity)

Adds a TableOperation to the TableBatchOperation that replaces the contents of the specified entity in a table.

Retrieve(String, String) Retrieve(String, String) Retrieve(String, String)

Adds a TableOperation to the TableBatchOperation that retrieves an entity with the specified partition key and row key.

Retrieve<TElement>(String, String, List<String>) Retrieve<TElement>(String, String, List<String>) Retrieve<TElement>(String, String, List<String>)

Inserts a TableOperation into the batch that retrieves an entity based on its row key and partition key. The entity will be deserialized into the specified class type which extends ITableEntity.

Retrieve<TResult>(String, String, EntityResolver<TResult>, List<String>) Retrieve<TResult>(String, String, EntityResolver<TResult>, List<String>) Retrieve<TResult>(String, String, EntityResolver<TResult>, List<String>)

Adds a table operation to retrieve an entity of the specified class type with the specified partition key and row key to the batch operation.

Explicit Interface Implementations

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Returns an IEnumerator.

Extension Methods

IsDefined(Object) IsDefined(Object) IsDefined(Object)

Determines if a certain property is defined or not.

IsNull(Object) IsNull(Object) IsNull(Object)

Determines if a certain property is null or not.

IsPrimitive(Object) IsPrimitive(Object) IsPrimitive(Object)

Determines if a certain property is of premitive JSON type.

ToCommaSeparatedString<T>(IEnumerable<T>) ToCommaSeparatedString<T>(IEnumerable<T>) ToCommaSeparatedString<T>(IEnumerable<T>)

Converts the elements of a collection to strings and concatenates them into a comma-separated list, or returns null for null or empty collections.

Applies to