Azure移动应用程序node.js后端Android客户端-50行限制 [英] Azure Mobile App node.js backend Android client - 50 row limit

查看:77
本文介绍了Azure移动应用程序node.js后端Android客户端-50行限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试超过Azure移动应用返回的50行结果,但是到目前为止没有成功.我尝试了以下方法:一个.Top(100),Skip(100)->在我的上下文中,此解决方案对我没有用.b.有人建议在我尝试过的app.js中将pageSize增加到200-但这不起作用.我仍然只返回了50行.

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.

任何有关如何解决此问题的指针?提前致谢.-桑卡尔

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

推荐答案

根据node.js中Mobile Apps表操作的源代码, queryjs 对象,其中包含 take()函数,可以将返回的项目数限制为指定的数量.

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.

此外, take()函数包含在移动应用程序服务器sdk中,因此不适用于您的客户端代码.

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

您可以在Easy Tables脚本上进行一些修改,例如.

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

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

这篇关于Azure移动应用程序node.js后端Android客户端-50行限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆