| |
read source history
= limit() =
----
[[MongoDB Driver Function Reference]]
Restricts the number of rows returned.
More information can be found in the corresponding entry of the [[https://docs.mongodb.com/manual/reference/method/cursor.limit/index.html|MongoDB Manual]].
[[[@cG
<cursor>.limit(<number>)
]]]
**Arguments**
[[[@w
|@t0@r0@c0 <cursor> | | A result set. |
| <number> | | Maximum number of rows to return. |
]]]
**Returns**
[[[@w
Returns a result set (cursor).
]]]
**Example**
[[[@cw
db.employees.find().limit(10);
]]]
Returns a maximum of ten documents from the //employee// collection.
----
[[Main|home]] | [[MongoDB Driver Function Reference]] | [[MongoDB Driver]]
|