如何在 DocumentDB 的存储过程中设置 "feed options"?

How to set "feed options" inside a stored procedure in DocumentDB?

我正在门户内的 DocumentDB 中编辑存储过程。

从 SP azure 提供的样本开始。

在部分中:

 var isAccepted = collection.queryDocuments(
    collection.getSelfLink(),
    'SELECT * FROM r WHERE r.ProductId = "00000000-0000-0000-0000-000000000000"',
    function (err, feed, options) {
        if (err) throw err;

该供稿仅获得 100 个结果。我该如何改变它? 在哪里可以找到此函数的参考?

FeedOptions对象的pageSize参数就是你需要的。 FeedOptionsQueryDocuments(...) 调用的第三个参数。

这是它的 link 文档:

http://azure.github.io/azure-documentdb-js-server/Collection.html#.FeedOptions

要使页面大小为 1000,更新后的代码段应如下所示:

var isAccepted = collection.queryDocuments(
  collection.getSelfLink(),
  'SELECT * FROM r WHERE r.ProductId = "00000000-0000-0000-0000-000000000000"',
  {pageSize: 1000},
  function (err, feed, options) {
    if (err) throw err;