Search for a field in the realm database

0

Someone knows how to perform a query in Realm where the entire table was scanned and the tuples were taken where the name of a field corresponded to the one I have.

That is, if we have a database of a library, and we want to take users with a given last name

    
asked by CMorillo 16.04.2018 в 10:06
source

1 answer

3

Hello friend, it's easy, you just have to do something like this

RealmResults<Usuario> Usuarios
Usuarios = realm.where("Tu modelo").equalTo("Nombre de tu columna ", "Valor a buscar").findAll();

and in this way you will get the results according to your filter. I hope you serve as a friend.

    
answered by 14.08.2018 / 23:38
source