updated mongo notes for 'distinct'

master
Chandra Mohan Jha 3 years ago
parent 2c9ff796fa
commit 3f93f3f953
  1. 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…
Cancel
Save