对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

游标.objsLeftInBatch()(mongosh方法)

cursor.objsLeftInBatch()

重要

mongosh 方法

This page documents a mongosh method. This is not the documentation for a language-specific driver, such as Node.js.

如需了解 MongoDB API 驱动程序,请参阅特定语言的 MongoDB 驱动程序文档。

cursor.objsLeftInBatch() 返回当前批次中剩余的文档数。

MongoDB 实例分批返回响应。 要从游标检索所有文档,可能需要来自 MongoDB 实例的多个批处理响应。 当当前批处理中没有剩余文档时,游标将检索另一个批处理以获取更多文档,直到游标耗尽。

此方法可用于以下环境中托管的部署:

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

注意

This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.

给本页内容打分

在此页面上