指定查询结果集数量上限
参数
value: number
返回值
Collection
说明
limit 在小程序端默认及最大上限为 20,在云函数端默认及最大上限为 1000
示例代码
db.collection('todos').limit(10)
.get()
.then(console.log)
.catch(console.error)
最后一次编辑于 2026-07-04
指定查询结果集数量上限
limit 在小程序端默认及最大上限为 20,在云函数端默认及最大上限为 1000
db.collection('todos').limit(10)
.get()
.then(console.log)
.catch(console.error)