Edit Page

.skip()

Indicate the number of records to skip before returning the results from executing a query instance.

.skip(numRecordsToSkip)

Usage

#
Argument Type Details
1 numRecordsToSkip Number The number of records to skip.

Example

#

To retrieve records for all but the original user named Jake:

var fakeJakes = await User.find({ name: 'Jake' });
.skip(1);

return res.json(fakeJakes);

Notes

#

If the “skip” value is greater than the number of records matching the query criteria, the query will return an empty array. The .find() method returns a chainable object if you don't supply a callback. This method can be chained to .find() to further filter your results.

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.

Reference

Reference