updated mongo notes for 'distinct'
This commit is contained in:
parent
2c9ff796fa
commit
3f93f3f953
2
mongo.md
2
mongo.md
|
@ -28,6 +28,8 @@
|
|||
|
||||
` db.<collection_name>.findOne({<key-value pair condition>}) ` show the first object in collection; condition is optional
|
||||
|
||||
` db.<collection_name>.distinct('<property_name>) ` list all the distinct values present for given property
|
||||
|
||||
` db.<collection_name>.update() ` update the object.
|
||||
- `.update({<mathcing_condition>}, {<updated_value>}, {upsert: true/false}) ` If the upsert value is true then the new object is created if there is no object with given matching condition otherwise ignores
|
||||
- ` <update_value> ` If the object is given directly, then it will override the content of previous object
|
||||
|
|
Loading…
Reference in New Issue