参考 > 参考 > mongo Shell方法 > 游标方法 > cursor.isClosed()
cursor.
isClosed
()¶mongo
壳法
此页面记录了mongo
shell方法,并且
没有引用MongoDB Node.js驱动程序(或任何其他驱动程序)方法。对于相应的MongoDB驱动程序API,请改为参考您特定的
MongoDB驱动程序文档。
返回值: | 布尔值。 |
---|
cursor.isClosed()
true
如果服务器已关闭游标,则返回。
封闭的光标可能仍具有最后接收的批次中剩余的文档。使用cursor.isExhausted()
或
cursor.hasNext()
检查光标是否完全耗尽。