Skip to content

0.4.4

Compare
Choose a tag to compare
@spnkr spnkr released this 30 Dec 01:30
· 20 commits to main since this release

Added Predicate.empty() method.

Returns a new, non-nil, NSPredicate object that will match every single row in the database.

This is especially helpful with:

  1. The @FetchRequest property wrapper.
    • Using a nil predicate can cause unexpected behavior if you dynamically assign or edit the predicate at runtime.
  2. Other Core Data quirks around nil predicates and updating when you do fancy stuff.

Before:

@FetchRequest(sortDescriptors: [], predicate: nil)

After

@FetchRequest(sortDescriptors: [], predicate: Predicate.empty())

Full Changelog: 0.4.3...0.4.4