跳到主要内容

count

统计集合中文档数量

声明

int count(map query_data, map opts = {})

参数

参数名描述
query_data查询条件
opts操作选项

返回值

文档数量;如果失败,则返回-1

使用方式

返回文档