微信小程序云開發(fā)服務端數(shù)據(jù)庫API Collection.skip
Collection.skip / Query.skip
指定查詢返回結(jié)果時從指定序列后的結(jié)果開始返回,常用語分頁
方法簽名如下:
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)
}
}
中國· 上海

添加微信咨詢
關鍵詞
辦公室:上海市浦東新區(qū)郭守敬路351號
CopyRight?2009-2019 上海谷谷網(wǎng)絡科技有限公司 All Rights Reserved. 滬ICP備11022482號-8
- top
- 在線咨詢
-
添加微信咨詢