limit( )


Limits the number of items the query returns.

The limit() function defines the number of results a query returns in each page. Only one page of results is retrieved at a time. The next() and prev() functions are used to navigate the pages of a query result.

By default, limit is set to 50.

The maximum value that limit() can accept is 1000.

Method Declaration
Copy
function limit(limit: number): WixBookingsQueryBuilder;
Method Parameters
limitnumberRequired

The number of items to return, which is also the pageSize of the results object.

Returns
JavaScript
let query = bookings.queryBookings().limit(10);
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?