setVerboseShell()

在本页面

setVerboseShell()的格式为:

setVerboseShell(true)

setVerboseShell()采用一个布尔参数。指定true或将参数保留为空白以激活详细 Shell。指定false停用。

Example

下面的示例演示了详细 shell 的行为:

setVerboseShell(true)
db.restaurants.aggregate(
   [
      { $match: { "borough": "Queens", "cuisine": "Brazilian" } },
      { $group: { "_id": "$address.zipcode" , "count": { $sum: 1 } } }
   ]
);
{ "_id" : "11377", "count" : 1 }
{ "_id" : "11368", "count" : 1 }
{ "_id" : "11101", "count" : 2 }
{ "_id" : "11106", "count" : 3 }
{ "_id" : "11103", "count" : 1 }
Fetched 5 record(s) in 0ms
首页