html52.com
我爱小程序-开发者交流社区

云函数调用接口查询条件只能链式调用?

问题模块 框架类型 问题类型 终端类型 AppID 基础库版本
云开发 小程序 Bug 客户端 wx1ac71b3252150d34 2.0.4

在服务端调用云函数API接口


const  Article = db.collection('article');


//这这样写返回的数据是正确的
const result = await  Article.where(where).orderBy('createdAt', 'desc').limit(5).get();
 
//这样写返回的数据排序是错误的,limit限定也不起作用

const query = Arctile.where(where);

if(xx===yy){

 query.orderBy('createdAt', 'desc');

}

query.limit(5);

const r = await query.get();




请问是不支持这样写么?

网友回复

Mr.Lyy:

@官方   解答一下,着急呢

半寸灰:

不支持  哈

山南水北:

啥时候才能从云开发坑里爬出来?

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付