Azure手機應用程序節點。js后台Android客戶端- 50行限制

[英]Azure Mobile App node.js backend Android client - 50 row limit


I have been trying to get over the 50 rows result returned by Azure mobile app, but no success so far. I have tried the following: a. Top(100), Skip(100) -> this solution is not useful to me in my context. b. Someone suggested to increase the pageSize to 200 in the app.js which I tried - but this did not work. I still got only 50 rows returned.

我一直在努力克服Azure移動應用程序返回的50行結果,但到目前為止還沒有成功。我試過以下方法:a. Top(100), Skip(100) ->在我的上下文中,這個解決方案對我沒有幫助。b.有人建議在app.js中增加pageSize到200,但這沒有用。我仍然只返回了50行。

Any pointers on how to resolve this? Thanks in advance. - Sankar

有什么建議嗎?提前謝謝。——Sankar

2 个解决方案

#1


1  

According the source code of table operations of Mobile Apps in node.js, the read operation ultimately receives context.query which is a queryjs object, which contains a take() function which can limit the number of items returned to the specified number.

根據移動應用在node中的表格操作的源代碼。讀取操作最終接收上下文。查詢是一個queryjs對象,它包含一個take()函數,該函數可以限制返回到指定數字的項的數量。

Additionally, the take() function is contained in the mobile app server sdk, so it doesn't work on your client end code.

另外,take()函數包含在移動應用程序服務器sdk中,所以它不能在您的客戶端代碼上工作。

You can do some modification on your Easy Tables scripts, E.G.

您可以對簡單的表腳本進行一些修改,例如

table.read(function (context) {
    context.query.take(100);
    return context.execute();
});

#2


2  

In app.js add the following line:

在app.js中添加如下一行:

var mobileApp = azureMobileApps({
    ....,
    pageSize: 200
});

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2016/08/04/72f477f69cca55528ddb0bfb8ff9c33e.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com