1.

Pagination can be achieved in MongoDB using combination of limit() and skip()

Answer»

DB.<collection&GT;.find().skip(N).limit(n)

Note: n is the pagesize, for the first page skip(n) will not be applicable

limit(n) LIMITS the documents to be RETURNED from the cursor to n, skip(n) will skip n documents

from the cursor



Discussion

No Comment Found