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.

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

Upvotes: 2

Views: 469

Answers (2)

4ndro1d
4ndro1d

Reputation: 2976

In app.js add the following line:

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

Upvotes: 3

Gary Liu
Gary Liu

Reputation: 13918

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.

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

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

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

Upvotes: 1

Related Questions