16.Update Methods-官方文档摘录

Posted 熊出陌

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了16.Update Methods-官方文档摘录相关的知识,希望对你有一定的参考价值。

这里没什么好说的,直接贴文了

MongoDB provides the following methods for updating documents in a collection:

db.collection.updateOne()

Updates at most a single document that match a specified filter even though multiple documents may match the specified filter.

New in version 3.2.

db.collection.updateMany()

Update all documents that match a specified filter.

New in version 3.2.

db.collection.replaceOne()

Replaces at most a single document that match a specified filter even though multiple documents may match the specified filter.

New in version 3.2.

db.collection.update()

Either updates or replaces a single document that match a specified filter or updates all documents that match a specified filter.

By default, the db.collection.update() method updates a singledocument. To update multiple documents, use the multi option.

Additional Methods

The following methods can also update documents from a collection:

See the individual reference pages for the methods for more information and examples.

以上是关于16.Update Methods-官方文档摘录的主要内容,如果未能解决你的问题,请参考以下文章

摘录ECMAScript官方文档中重要的两段话

Configure the mongo Shell-官方文档摘录

8.Query Documents-官方文档摘录

Cocos Creator 加载和切换场景(官方文档摘录)

Error: Default interface methods are only supported starting with Android N (--min-api 24)类似问题解决(示例代

monit官方摘录