Members
The number of objects in the results.
Type:
number
Methods
- query
- Type:
string
Query used to filter results.
- arg optional repeatable
- Type:
any
Each subsequent argument is used by the placeholders (e.g.
$0
,$1
,$2
, …) in the query.-
Error
If the query or any other argument passed into this method is invalid.
- descriptor
- Type:
string
or[SortDescriptor, ...]
The property name(s) to sort results by.
- reverse optional
- Type:
boolean
- Default:
false
May only be provided if
descriptor
is a string.-
Error
If a specified property does not exist.
Realm.Results
Returns new results that are filtered by the provided query.
let merlots = wines.filtered('varietal == "Merlot" && vintage <= $0', maxYear);
Parameters:
Throws:
Realm.Results
filtered according to the provided query.
Realm.Results
Create a frozen snapshot of the results. This means changes to the list will not be
reflected in the results returned by this method. However, deleted objects will become
null
at their respective indices.
Realm.Results
which will not live update.
Realm.Results
Returns new results that are sorted by the provided property (or properties) of each object.
Parameters:
Throws:
Realm.Results
sorted according to the arguments passed in
Type Definitions
The sort descriptors may either just be a string representing the property name, or an
array with two items: [propertyName, reverse]
Type:
string
or Array