草庐IT

CountDocumentAsync

全部标签

C# MongoDB 驱动程序 [2.7.0] CountDocumentAsync 意外的 native 查询

我在使用C#MongoDBCountDocumentAsync函数时遇到了奇怪的事情。我在MongoDB上启用了查询日志记录,这就是我得到的:{"op":"command","ns":"somenamespace","command":{"aggregate":"reservations","pipeline":[{"some_query_key":"query_value"},{"$group":{"_id":null,"n":{"$sum":1}}}],"cursor":{}},"keyUpdates":0,"writeConflicts":0,"numYield":9,"lock