realm-dotnet icon indicating copy to clipboard operation
realm-dotnet copied to clipboard

Async Queries

Open AndyDentFree opened this issue 10 years ago • 4 comments

AndyDentFree avatar Dec 17 '15 12:12 AndyDentFree

This is not going to land before 1.0 and doesn't appear to be a blocker.

nirinchev avatar Feb 01 '17 15:02 nirinchev

Any updates on this one? Seems like a core feature (findAllAsync in other APIs) which is missing from the .NET api.

peppy avatar Dec 04 '19 05:12 peppy

We don't have an API for this in .NET yet, but you can achieve the same effect if you use collection notifications using SubscribeForNotifications. This will execute the query on a worker thread and invoke the callback first with the entire collection, and then with any subsequent changes as they're detected. What you can do is build up a query, call SubscribeForNotifications and in the callback dispose of the notification token and use the results of the query.

fealebenpae avatar Dec 04 '19 17:12 fealebenpae

thank you, this is what i was looking for. i missed the fact i can get a RealmCollection from an IQueryable.

peppy avatar Dec 05 '19 00:12 peppy