BackendlessCollection PageSize

If we don’t set the PageSize for the query with a queryOption, is there a default page size that is set? If so, is there a way to remove the size limit, so that the entire collection is returned on one page?

The default value is 10 objects. With the Cloud Backendless option, maximum page size is 100 objects.

The Managed Backendless and Backendless Pro options completely remove the page size limit.

Regards,
Mark

Thanks Mark.

Maybe I am misunderstanding the default. I have not set a default and am returning 36 objects when I do not set a limit.

       let currentUserUsername = self.backendless?.userService.currentUser.getProperty("username") as! String?


        // Search for the username to see if it already exists.  Create whereClause and dataQuery.
        let whereClause = "following = '" + currentUserUsername! + "'"
        let dataQuery = BackendlessDataQuery()
        dataQuery.whereClause = whereClause
        
        self.backendless?.data.of(FollowBE.ofClass()).find(dataQuery, response: {(result : BackendlessCollection?) -> () in
            
// Getting the size of the page
            let currentData = result?.data as! [FollowBE]            
            print(currentData.count)


            let currentFollow = result?.getCurrentPage()
            
            for follow in currentFollow as! [FollowBE]
            {
                print("The follower is \(follow.follower) and they are following \(follow.following)")
            }
            }, error: { (fault : Fault?) -> () in
            
            print("FollowersVC loadFollowers query reported an error: \(fault)")
        })

The iOS SDK overrides the default limit:

That answers it. Thanks Mark!

I am testing 3.6 Pro. When I make a request with pagesize > 100, I am getting the error below. How do you configure Pro to allow larger page size?

https://foo.com/api/v1/data/Product?pageSize=200
{
“code”: 1025,
“message”: “Invalid pagesize. Page size cannot be greater than 100.”
}

Please see the documentation at (specifically at the bottom of the page):
https://backendless.com/documentation/backendlesspro/st_changing_default_limits.htm

Mark,

Please note that the JS SDK has logic to only allow pagesize of less than 100. I have not checked if other SDK have this logic as well.

'pageSize': function (arg) {
                 if (arg < 1 || arg > 100) {
                    throw new Error('PageSize can not be less then 1 or greater than 100');
                } else {
                return 'pagesize=' + arg;
            },

That’s not a problem. We provided a modified build of the SDK without the upper limit restriction to Backendless Pro customers. Going forward we’ll remove the hard-coded upper limit in the JS SDK.