Merge branch 'master' of https://git.nixnet.xyz/imcmjha/notepad
This commit is contained in:
commit
75506ab96a
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>.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.
|
` 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({<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
|
- ` <update_value> ` If the object is given directly, then it will override the content of previous object
|
||||||
|
|
Loading…
Reference in New Issue