MongoDB-CN-Manual
搜索文档…
MongoDB-CN-Manual
MongoDB中文手册|官方文档中文版
MongoDB用户手册说明
MongoDB简介
安装 MongoDB
The mongo Shell
MongoDB CRUD操作
MongoDB聚合
MongoDB数据模型
MongoDB事务
MongoDB事务
MongoDB索引
MongoDB安全
Change Streams变更流
MongoDB复制
MongoDB分片
MongoDB管理
MongoDB存储
MongoDB参考
运算符
数据库命令
mongo Shell 方法
集合方法
db.collection.aggregate()
db.collection.bulkWrite()
db.collection.copyTo()
db.collection.count()
db.collection.countDocuments()
db.collection.estimatedDocumentCount()
db.collection.createIndex()
db.collection.createIndexes()
db.collection.dataSize()
db.collection.deleteOne()
db.collection.deleteMany()
db.collection.distinct()
db.collection.drop()
db.collection.dropIndex()
db.collection.dropIndexes()
db.collection.ensureIndex()
db.collection.explain()
db.collection.find()
db.collection.findAndModify()
db.collection.findOne()
db.collection.findOneAndDelete()
db.collection.findOneAndReplace()
db.collection.findOneAndUpdate()
db.collection.getIndexes()
db.collection.getShardDistribution()
db.collection.getShardVersion()
db.collection.insert()
db.collection.insertOne()
db.collection.insertMany()
db.collection.isCapped()
db.collection.latencyStats()
db.collection.mapReduce()
db.collection.reIndex()
db.collection.remove()
db.collection.renameCollection()
db.collection.replaceOne()
db.collection.save()
db.collection.stats()
db.collection.storageSize()
db.collection.totalIndexSize()
db.collection.totalSize()
db.collection.update()
db.collection.updateOne()
db.collection.updateMany()
db.collection.watch()
db.collection.validate()
MongoDB中的限制与阈值
MongoDB系统集合
词汇表
默认的MongoDB端口
默认的MongoDB读/写关注
服务器会话
MongoDB FAQ
MongoDB 版本管理
联系我们
由
GitBook
提供支持
集合方法
注意
有关特定方法(包括语法和示例)的详细信息,请单击特定方法以转到其 reference 页面。
名称
描述
db.collection.aggregate()
提供对聚合管道的访问。
db.collection.bulkWrite()
提供批量写入操作功能。
db.collection.copyTo()
已过时。包装EVAL以在单个 MongoDB 实例中的集合之间复制数据。
db.collection.count()
包装计数以_return 计算集合或视图中的文档数。
db.collection.createIndex()
在集合上构建索引。
db.collection.createIndexes()
在集合上构建一个或多个索引。
db.collection.dataSize()
返回集合的大小。包装collStats输出中的尺寸字段。
db.collection.deleteOne()
删除集合中的单个文档。
db.collection.deleteMany()
删除集合中的多个文档。
db.collection.distinct()
返回具有指定字段的不同值的文档的 array。
db.collection.drop()
从数据库中删除指定的集合。
db.collection.dropIndex()
删除集合上的指定索引。
db.collection.dropIndexes()
删除集合上的所有索引。
db.collection.ensureIndex()
已过时。使用db.collection.createIndex()。
db.collection.explain()
返回有关各种方法的查询执行的信息。
db.collection.find()
对集合或视图执行查询并返回游标 object。
db.collection.findAndModify()
以原子方式修改并返回单个文档。
db.collection.findOne()
执行查询并返回单个文档。
db.collection.findOneAndDelete()
查找单个文档并将其删除。
db.collection.findOneAndReplace()
查找单个文档并替换它。
译者:李冠飞
校对:
以前
mongo Shell 方法
下一个
db.collection.aggregate()
最近更新
9mo ago
复制链接