我想在像android
这样的单个语句行中实现filter的realm查询Android:
RealmResults<Contact> contactList = realm.where(Contact.class)
.equalTo(Contact.IS_FORMATTED, Boolean.TRUE)
.equalTo(Contact.IS_NEW_CONTACT, Boolean.TRUE)
.findAll();
斯威夫特:
如何在swift单行语句中实现上述查询?
答案 0 :(得分:2)
let contactList = realm.objects(Contact)
.filter("IS_FORMATTED == true AND IS_NEW_CONTACT == true")