你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

TableBatchOperation 类

定义

表示对表执行的批处理操作。

public sealed class TableBatchOperation : System.Collections.Generic.ICollection<Microsoft.Azure.Cosmos.Table.TableOperation>, System.Collections.Generic.IEnumerable<Microsoft.Azure.Cosmos.Table.TableOperation>, System.Collections.Generic.IList<Microsoft.Azure.Cosmos.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)
继承
TableBatchOperation
实现

注解

批处理操作是表操作的集合,存储服务 REST API 通过调用 实体组事务作为单个原子操作执行这些操作。

一个批处理操作最多可以包含 100 个不同的表操作,但要求是每个操作实体必须具有相同的分区键。 包含检索操作的批处理不能包含任何其他操作。 请注意,批处理操作的总负载限制为 4MB。

构造函数

TableBatchOperation()

初始化 TableBatchOperation 类的新实例。

属性

Count

获取此 TableBatchOperation 中的操作数。

IsReadOnly

获取一个值,该值指示 TableBatchOperation 是否为只读。

Item[Int32]

获取或设置位于指定索引处的 TableOperation 项。

方法

Add(TableOperation)

TableOperation 添加到 TableBatchOperation

Clear()

TableOperation 中清除所有 TableBatchOperation 对象。

Contains(TableOperation)

如果此 TableBatchOperation 包含指定的元素,则返回 true

CopyTo(TableOperation[], Int32)

TableBatchOperation 的所有元素复制到指定的一维数组,从指定的目标数组索引开始。

Delete(ITableEntity)

TableOperation 中添加 TableBatchOperation,用于从表中删除指定的实体。

GetEnumerator()

返回 IEnumerator<T>TableBatchOperation

IndexOf(TableOperation)

返回第一个指定的 TableOperation 项的从零开始的索引,如果 TableBatchOperation 不包含该项,则返回 -1。

Insert(Int32, TableOperation)

TableOperation 插入到 TableBatchOperation 中的指定索引位置处。

Insert(ITableEntity)

TableOperation 中添加 TableBatchOperation,用于在表中插入指定的实体。

Insert(ITableEntity, Boolean)

添加一个 TableOperation 对象,用于在批处理操作期间向表中插入指定的实体。

InsertOrMerge(ITableEntity)

TableOperation 中添加 TableBatchOperation,用于在表中插入指定的实体(如果该实体不存在);如果该实体存在,则将其内容与提供的实体合并。

InsertOrReplace(ITableEntity)

TableOperation 中添加 TableBatchOperation,用于在表中插入指定的实体(如果该实体不存在);如果该实体存在,则将其内容替换为提供的实体。

Merge(ITableEntity)

TableOperation 中添加 TableBatchOperation,用于将指定实体的内容与表中的现有实体合并。

Remove(TableOperation)

TableOperation 中删除指定的 TableBatchOperation 项。

RemoveAt(Int32)

TableOperation 中的指定索引处删除 TableBatchOperation

Replace(ITableEntity)

TableOperation 中添加 TableBatchOperation,用于替换表中指定实体的内容。

Retrieve(String, String)

TableOperation 中添加 TableBatchOperation,用于检索具有指定分区键和行键的实体。

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

TableOperation 插入到基于其行键和分区键检索实体的批处理中。 该实体将反序列化为指定的类类型,该类型扩展 ITableEntity

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

向批处理操作添加表操作以检索具有指定分区键和行键的指定类类型的实体。

显式接口实现

IEnumerable.GetEnumerator()

返回 IEnumerator

扩展方法

ToCommaSeparatedString<T>(IEnumerable<T>)

将集合的元素转换为字符串,并将它们连接成逗号分隔的列表,或返回 null 或空集合的 null。

适用于