Ray's playground

 

Creating, Updating, and Deleting Documents(Chapter 3 of MongoDB The Definitive Guild)

  "$set" sets the value of a key. If the key does not yet exist, it will be created. This can be handy for updating schema or adding user-defined keys.

  The "$inc" modifier can be used to change the value for an existing key or to create a new key if it does not already exist. 

posted on 2010-10-01 09:16  Ray Z  阅读(120)  评论(0编辑  收藏  举报

导航