【问题标题】:Dexie.js query errorDexie.js 查询错误
【发布时间】:2018-03-16 18:54:17
【问题描述】:

以下查询抛出错误:

  DB.classes
    .where("name")
    .anyOf(["John", "Rick"])
    .or("nickname")
    .anyOf(["Joe", "Bill"])
    .and("isDummy")
    .equals("1")
    .toArray().then(()=>{})

如何以正确的方式重写查询?

【问题讨论】:

    标签: javascript dexie


    【解决方案1】:
    DB.classes
    .where("name")
    .anyOf(["John", "Rick"])
    .or("nickname")
    .anyOf(["Joe", "Bill"])
    .and(clazz => clazz.isDummy === 1)
    .toArray().then(()=>{})
    

    【讨论】:

      猜你喜欢
      • 2021-01-14
      • 2019-12-12
      • 2016-12-24
      • 2021-05-04
      • 2021-08-11
      • 2012-12-20
      • 1970-01-01
      • 1970-01-01
      • 2022-01-01
      相关资源
      最近更新 更多