diff --git a/mongo.md b/mongo.md index 7aa7c67..22d87c3 100644 --- a/mongo.md +++ b/mongo.md @@ -28,6 +28,8 @@ ` db..findOne({}) ` show the first object in collection; condition is optional +` db..distinct(') ` list all the distinct values present for given property + ` db..update() ` update the object. - `.update({}, {}, {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 - ` ` If the object is given directly, then it will override the content of previous object