const dbJQL = uniCloud.databaseForJQL({
event,
context
}).collection("table1").getTemp()
const dbJQLUser = uniCloud.databaseForJQL({
event,
context
}).collection("uni-id-users").getTemp()
const {pageIndex, pageSize, cityCode} = event
const totalPages = 0
const result = await uniCloud.database().collection(dbJQL, dbJQLUser).where({"city_code": cityCode}).orderBy("created_time", "desc").skip(pageSize * pageIndex).limit(pageSize).get({getCount: true})
result['totalPages'] = (result.count + pageSize -1) / pageSize
return result
报错如下:
Query failed with error code 73 and error message 'Invalid collection name specified
使用JQL扩展函数是为了使用getCount:true.
请问这种场景使用现有代码可以实现吗?或者其他写法?
1 个回复
JoeX (作者)
已解决