在我正在处理的项目中,使用nodejs和mongo构建,有一个函数接受查询并根据提供给它的限制和偏移量返回数据集。与此数据一起,该函数返回一个总计数,说明数据库中存在的所有匹配对象。下面是函数://optionscarrythelimit&offsetvalues//mongoQuerycarriesamongomatchingqueryfunctionfindMany(query,options,collectionId){constcursor=getCursorForCollection(collectionId).find(query,options);returnPromis