RxCoreData icon indicating copy to clipboard operation
RxCoreData copied to clipboard

Feature/notification based observation

Open marshallxxx opened this issue 7 years ago • 4 comments

Add notification based NSManagedObjectContext change observation.

This adds two extra reactive extension to NSManagedObjectContext:

  1. Observable for any context changes
  2. Observable for object change in context

This would allow us later to create an observable with NSFetchRequest which will be notification based instead of NSFetchedResultsController. Benefits would be that every time a relationship of a type is changed we can trigger next value.

marshallxxx avatar Jul 28 '18 12:07 marshallxxx

This is a really large change, and I don't use Core Data enough to review it. I'm wondering if there's any way to split this into smaller PRs, or would you say this is a singular feature?

Thanks, Shai.

freak4pc avatar Jul 28 '18 15:07 freak4pc

@freak4pc I will give a look on Monday. However @marshallxxx it looks promising. 👍🏿

bobgodwinx avatar Jul 28 '18 16:07 bobgodwinx

@freak4pc agree, it looks quite large. But mainly it's addition of ManagedObjectContextNotificationObserver.

I've moved few things around, like NSManagedObjectContext+Persistable 😬, which adds extra changes.

marshallxxx avatar Jul 28 '18 17:07 marshallxxx

@marshallxxx Can you re-base this to use the new RxSwift 4.3.1 Thanks

bobgodwinx avatar Sep 19 '18 07:09 bobgodwinx