指定查询返回结果时从指定序列后的结果开始返回,常用语分页
方法签名如下:
function skip(offset: number): Collection | Query
示例代码
const cloud = require('wx-server-sdk')
cloud.init()
const db = cloud.database()
exports.main = async (event, context) => {
try {
return await db.collection('todos').skip(10).get()
} catch(e) {
console.error(e)
}
}
© 2023 mianshi8.net MIT license