MongoDB shell 格式化

直接的方法:

db.collection.find().pretty();

 

如果想要所有的查询都格式化,可以执行:

echo "DBQuery.prototype._prettyShell = true" >> ~/.mongorc.js
posted @ 2015-11-18 20:40  VoctrALs  阅读(887)  评论(0编辑  收藏  举报