且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用多个分区键从Azure cosmos DB集合中删除文档

更新时间:2021-07-02 22:31:42

当前情况就像我必须运行存储过程10次 通过每次提供每个分区键值.是否可以运行 单个存储区中用于不同分区键值的此存储过程 去吗?

Current scenario is like i have to run the stored procedure 10 times by providing each partition key value each time. Is it possible to run this stored procedure for different partition key values in a single go?

不幸的是,没有.您不能为存储过程提供多个分区键.您将需要执行10次存储过程.

Unfortunately no. You can't provide multiple partition keys to a stored procedure. You will need to execute the stored procedure 10 times.

您可以做的一件事是使用任何可用的SDK并编写代码以循环执行存储过程.您可以创建一个分区键数组并循环遍历,并为该数组中的每个分区键执行存储过程.

One thing you could do is use any available SDK and write code to execute stored procedure in a loop. You could create an array of partition keys and loop through that and execute stored procedure for each partition key in that array.