add update operator to documentation
This commit is contained in:
parent
5fe9436ea7
commit
8428da368d
@ -543,7 +543,10 @@ Documents may be updated atomically by using the
|
||||
There are several different "modifiers" that you may use with these methods:
|
||||
|
||||
* ``set`` -- set a particular value
|
||||
* ``set_on_insert`` -- set only if this is new document `need to add upsert=True`_
|
||||
* ``unset`` -- delete a particular value (since MongoDB v1.3)
|
||||
* ``max`` -- update only if value is bigger
|
||||
* ``min`` -- update only if value is smaller
|
||||
* ``inc`` -- increment a value by a given amount
|
||||
* ``dec`` -- decrement a value by a given amount
|
||||
* ``push`` -- append a value to a list
|
||||
@ -552,6 +555,7 @@ There are several different "modifiers" that you may use with these methods:
|
||||
* ``pull`` -- remove a value from a list
|
||||
* ``pull_all`` -- remove several values from a list
|
||||
* ``add_to_set`` -- add value to a list only if its not in the list already
|
||||
* ``rename`` -- rename the key name
|
||||
|
||||
.. _depending on the value: http://docs.mongodb.org/manual/reference/operator/update/pop/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user