cursor.
isClosed
()¶mongo
Shell Method
This page documents the 本页记录了mongo
shell method, and does not refer to the MongoDB Node.js driver (or any other driver) method. mongo
shell方法,未提及MongoDB Node.js驱动程序(或任何其他驱动程序)方法。For corresponding MongoDB driver API, refer to your specific MongoDB driver documentation instead.有关相应的MongoDB驱动程序API,请参阅特定的MongoDB驱动程序文档。
Returns: | Boolean. |
---|
如果服务器已关闭游标,则cursor.isClosed()
returns true
if the server has closed the cursor.cursor.isClosed()
返回true
。
A closed cursor may still have documents remaining in the last received batch. 关闭的游标可能仍有最后一批接收的文档。Use 使用cursor.isExhausted()
or cursor.hasNext()
to check if the cursor is fully exhausted.cursor.isExhausted()
或cursor.hasNext()
检查游标是否已完全耗尽。