重要
mongosh 方法
This page documents a mongosh method. This is not the documentation for database commands or language-specific drivers, such as Node.js.
For the database command, see the field returned by the collStats command.
如需了解 MongoDB API 驱动程序,请参阅特定语言的 MongoDB 驱动程序文档。
定义
db.collection.isCapped()返回: 如果该collection是固定大小collection,则返回
true,否则返回false。提示
兼容性
此方法可用于以下环境中托管的部署:
- MongoDB Atlas:用于云中 MongoDB 部署的完全托管服务
注意
所有 MongoDB Atlas 集群都支持此命令。有关 Atlas 对所有命令的支持的信息,请参阅不支持的命令。
MongoDB Enterprise:基于订阅、自我管理的 MongoDB 版本
MongoDB Community:源代码可用、免费使用且可自行管理的 MongoDB 版本