Realm Query
A RealmQuery encapsulates a query on a Realm, a RealmResults or a RealmList instance using the Builder pattern. The query is executed using either
A Realm is unordered, which means that there is no guarantee that a query will return the objects in the order they where inserted. Use the sort functions if a specific order is required.
Results are obtained quickly most of the times when using
Parameters
the class of the objects to be queried.
Functions
Finds all objects that fulfill the query conditions and returns them asynchronously as a Flow.
Returns a RealmScalarQuery that counts the number of objects that fulfill the query conditions.
Returns a textual description of the query.
Selects a distinct set of objects of a specific class. When multiple distinct fields are given, all unique combinations of values in the fields will be returned. In case of multiple matches, it is undefined which object is returned. Unless the result is sorted, then the first object will be returned.
Finds all objects that fulfill the query conditions and returns them in a blocking fashion.
Returns a query that finds the first object that fulfills the query conditions.
Limits the number of objects returned in case the query matched more objects.
Sorts the query result by the specific property name according to Pairs of properties and sorting order.
Sorts the query result by the specific property name according to sortOrder, which is Sort.ASCENDING by default.
Extensions
Similar to
Similar to RealmQuery.max but the type parameter is automatically inferred.
Similar to RealmQuery.min but the type parameter is automatically inferred.
Similar to RealmQuery.sum but the type parameter is automatically inferred.