How to use MongoDBUpdate

I recently started reading some articles about MongoDB, and I feel more and more that it is what I need. However, I don’t know much about it first, and what I see are superficial phenomena, let’s get to know it slowly. I started reading the introduction to MongoDB written by Carl yesterday. It has 33 pages in total. I feel that the article is not very clear, and I need to try and experience it myself. For traditional databases, CRUD (=Create+Read+Update+Delete) is the core, and U is the most worthy of attention! Today, I read the introduction of the Update part and practiced it. Update has 4 parameters: the first, selector, the second, newValue, the third, upserts, the fourth, multipleUpdate The selector is the same as the CRD, it is a search selector that specifies the query conditions; newValue is the content to be updated, including two basic situations, that is, whether there are parameters such as $set, $inc, and $push: Case 1, if there is no parameter, then newValue replaces the content of the original selector; Case 2, if there are parameters, then $set is to update newValue for the specified field; $inc requires the specified field to be…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索