Is there any way to find all (or just the next) RealmObject
s with Strings lexicographically greater than the target?
Something like
MyEntry next = realm.where(MyEntry.class)
.greaterThan("name", current)
.findAllSorted("name")
.first();
which did not work, because greaterThan
is not implemented for String
s.
As a non-db-workaround, you can use
This does the searching outside of the db. Possibly not as well-performing, and not as readable, but it should work.