Closed invliD closed 8 years ago
Thanks! I do have some second thoughts about using the whereAttribute
methods for this. The point of the assertions on field names was to notify you when you mistyped an attribute name. To me, passing any random string into whereAttribute
feels odd. Perhaps we can create a more general method that allows random filter keys?
Perhaps we could keep the whereAttribute
methods as they were, and add one filterOn(key: String, value: String, type: NSPredicateOperatorType)
method to allow custom filtering without duplicating all the whereAttribute
methods.
Awesome idea. I'll implement that when I get to it.
👍
Unfortunately, I made a mistake in #83 that still prevented arbitrary filters from working. This PR fixes the issue when converting a query to a URL and also adds unit tests for this new use case.