diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cbfd7653b..8f86c20cbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ vNext * Primary key annotation no longer requires field to be final. ### Enhancements -* Allow query on lists +* Support query on lists of realm objects 0.2.0+alpha Release notes (2022-01-31) diff --git a/lib/src/list.dart b/lib/src/list.dart index dd164c03ce..b48a33ecfb 100644 --- a/lib/src/list.dart +++ b/lib/src/list.dart @@ -87,7 +87,15 @@ class RealmList extends collection.ListBase { // The query operations on lists only work for list of objects (core restriction), // so we add it as an extension method to allow the compiler to prevent misuse. extension RealmListOfObject on RealmList { - /// Filter list. + /// Filters the list and returns a new [RealmResults] according to the provided query. + /// + /// Only works for lists of Realm objects. + /// + /// @param query The query used to filter the list + /// @param args Optional parameters for substitution in the query + /// + /// The Realm Dart and Realm Flutter SDKs supports querying based on a language inspired by [NSPredicate](https://academy.realm.io/posts/nspredicate-cheatsheet/) + /// and [Predicate Programming Guide.](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Predicates/AdditionalChapters/Introduction.html#//apple_ref/doc/uid/TP40001789) /// /// @param query The query /// @param args Possible parameters for substition in query