From 3f93f3f953e7a2c7be2f2857a1883526dfcdf0a5 Mon Sep 17 00:00:00 2001 From: Chandra Mohan Jha Date: Wed, 12 Feb 2020 12:09:46 +0530 Subject: [PATCH] updated mongo notes for 'distinct' --- mongo.md | 2 ++ 1 file changed, 2 insertions(+) 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