请与境界数据库两个字段 [英] Check two fields with Realm database
本文介绍了请与境界数据库两个字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能创建一个域和
操作?
How can I create an and
operation with Realm?
例我有一天和一个月的对象,我要检查这两个字段的值。
Example I have an object with day and month and I want to check both those fields values.
是这样的:
RealmResults<Event> toEdit = realm.where(Event.class)
.equalTo("day", day)
.and
.equalTo("month", month)
.findAll();
不过,据我可以告诉有没有和
运营商。
感谢您
推荐答案
多个条件相结合,与,除非有一个。或()
之间,所以它只是:
Multiple conditions are combined with And unless there's an .or()
between them, so it's just:
RealmResults<Event> toEdit = realm.where(Event.class)
.equalTo("day", day)
.equalTo("month", month)
.findAll();
这篇关于请与境界数据库两个字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文