Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Consider making NSPredicates API public? #71

Open
DenTelezhkin opened this issue Jan 28, 2014 · 5 comments
Open

Consider making NSPredicates API public? #71

DenTelezhkin opened this issue Jan 28, 2014 · 5 comments
Milestone

Comments

@DenTelezhkin
Copy link

First of all, thanks for really awesome framework, it looks much better than monstrous MagicalRecord.

I'm using ObjectiveRecord in one of my project, and it takes advantage of NSFetchedResultsController to display data in UITableView and UICollectionView. Now most ActiveRecord style methods allow to fetch data from CoreData, but we don't need that with NSFetchedResultsController.

I could, of course, define private category, and just use private method of ObjectiveRecord, but that's probably not good. It could be great, if ObjectiveRecord provided a way to get NSPredicates from fancy where: methods.

@stephencelis
Copy link
Collaborator

There's work being done for 2.0 to support just this.

@supermarin
Copy link
Owner

@stephencelis we can still take a look if it's possible to simply add it to 1.x. Of course, if it won't bloat the whole thing

@stephencelis
Copy link
Collaborator

@supermarin We could add - (NSPredicate *)wherePredicateFor:(id)condition, or something more suitably named. It doesn't seem as clean of an API, though, and it would likely be dropped for the next big release. Thoughts?

@supermarin
Copy link
Owner

Oh crap, sorry i've totally misread this.
Not sure if we should expose predicates in the current api; I was thinking about a method that returns you a generated NSFetchedResultsController

@stephencelis
Copy link
Collaborator

@supermarin Yeah, that would be ideal, but without the query builder on the 2.0 branch, there would be a lot of class-level API bloat.

@stephencelis stephencelis added this to the 2.0 milestone Mar 27, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants