I would like to know what is the difference between RealmResults
and RealmList
.
The only difference I see is that realmlist is to input data, while RealmResults is to run a query.
Thanks
Please see the documentation here and here. Especially this part:
RealmList is used to model one-to-many relationships in a RealmObject.
RealmResults are always the result of a database query. RealmList can be used inside of a RealmObject to define One-To-Many relationships (RealmResults can't).
Also this part:
RealmList has two modes: A managed and non-managed mode. In managed mode all objects are persisted inside a Realm, in non-managed mode it works as a normal ArrayList.
A RealmList can be non-managed, thus act like a normal ArrayList, whereas RealmResults is a "window" into the database. Objects are not copied and put into the RealmResults, they are only referenced.
In short RealmResults are always a product of a database query, whereas RealmLists don't have to be.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With