【MongoDB】Update Operators
2021/6/14 2:24:41
本文主要是介绍【MongoDB】Update Operators,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
Update Operators
Fields
Name | Description |
---|---|
| Sets the value of a field to current date, either as a Date or a Timestamp. |
| Increments the value of the field by the specified amount. |
| Only updates the field if the specified value is less than the existing field value. |
| Only updates the field if the specified value is greater than the existing field value. |
| Multiplies the value of the field by the specified amount. |
| Renames a field. |
| Sets the value of a field in a document. |
| Sets the value of a field if an update results in an insert of a document. Has no effect on update operations that modify existing documents. |
| Removes the specified field from a document. |
Array
Operators
Name | Description |
---|---|
| Acts as a placeholder to update the first element that matches the query condition. |
| Acts as a placeholder to update all elements in an array for the documents that match the query condition. |
| Acts as a placeholder to update all elements that match the |
| Adds elements to an array only if they do not already exist in the set. |
| Removes the first or last item of an array. |
| Removes all array elements that match a specified query. |
| Adds an item to an array. |
| Removes all matching values from an array. |
Modifiers
Name | Description |
---|---|
| Modifies the |
| Modifies the |
| Modifies the |
| Modifies the |
Bitwise
Name | Description |
---|---|
| Performs bitwise |
参考:https://docs.mongodb.com/manual/reference/operator/update/
这篇关于【MongoDB】Update Operators的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-15SendGrid 的 Go 客户端库怎么实现同时向多个邮箱发送邮件?-icode9专业技术文章分享
- 2024-11-15SendGrid 的 Go 客户端库怎么设置header 和 标签tag 呢?-icode9专业技术文章分享
- 2024-11-12Cargo deny安装指路
- 2024-11-02MongoDB项目实战:从入门到初级应用
- 2024-11-01随时随地一键转录,Google Cloud 新模型 Chirp 2 让语音识别更上一层楼
- 2024-10-25Google Cloud动手实验详解:如何在Cloud Run上开发无服务器应用
- 2024-10-24AI ?先驱齐聚 BAAI 2024,发布大规模语言、多模态、具身、生物计算以及 FlagOpen 2.0 等 AI 模型创新成果。
- 2024-10-20goland工具下,如修改一个项目的标准库SDK的版本-icode9专业技术文章分享
- 2024-10-17Go学习:初学者的简单教程
- 2024-10-17Go学习:新手入门完全指南