2016-05-24 35 views
0

我在Portal中編輯DocumentDB中的存儲過程。如何在DocumentDB中的存儲過程中設置「feed選項」?

從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個結果。我該如何改變它? 我在哪裏可以找到對此功能的引用?

回答

2

FeedOptions對象的參數pageSize是您需要的參數。 FeedOptions是調用QueryDocuments(...)時的第三個參數。

下面是對文件的鏈接吧:

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;