Answers for "MongoDb Create"

C
3

create mongodb database

db = new Mongo().getDB("EtudiantDB");
Posted by: Guest on February-12-2021
0

MongoDb Create

1	db.coll.insertOne({name: "Max"})
2	db.coll.insert([{name: "Max"}, {name:"Alex"}]) // ordered bulk insert
3	db.coll.insert([{name: "Max"}, {name:"Alex"}], {ordered: false}) // unordered bulk insert
4	db.coll.insert({date: ISODate()})
5	db.coll.insert({name: "Max"}, {"writeConcern": {"w": "majority", "wtimeout": 5000}})
Posted by: Guest on January-01-2022

Code answers related to "C"

Browse Popular Code Answers by Language