2011年11月8日

Allan 译 The Little MongoDB Book (Chapter 2 - Updating)

摘要: Chapter 2 - Updating在第一章中我们介绍了四个CRUD(create, read, update和delete)操作中的三个。在这一章中了解我们跳过的个:update。 Update有几个让人惊叹的行为,这也就是为什么我们为什么用一章来介绍它。Update: Replace Versus $set在它最简单的形式,update带有两个参数:要使用的选择器(where)和要更新的字段。如果Roooooodles已经设置了重量,我们可以执行:db.unicorns.update({name: 'Roooooodles'}, {weight: 590})(如果你在使 阅读全文

posted @ 2011-11-08 21:09 Allan GC 阅读(257) 评论(1) 推荐(0) 编辑

导航