How to print out more than 20 items (documents) in MongoDB's shell?

前端 未结 6 1125
南笙
南笙 2020-11-28 00:22
db.foo.find().limit(300)

won\'t do it. It still prints out only 20 documents.

db.foo.find().toArray()
db.foo.find().forEach(printjs         


        
6条回答
  •  长情又很酷
    2020-11-28 01:21

    From the shell if you want to show all results you could do db.collection.find().toArray() to get all results without it.

提交回复
热议问题