All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
This file is generated by the changelog generator tool. To add a new changelog entry, run the
changelogtool. For more info, runchangelog helpor read the README.
- Fix SPM package resolution
- Bundle macro with Swift package
- Fixed representation of optional comparison values in the resulting format string. Optionals will now correctly be represented as
"nil"instead of<null>
- Removed a crash on comparison of an Optional key path to
nil
-
Result builder-based DSL for declarative predicate composition
-
DSL types
Value,And,Or,Not,AnyMembers,NoMembers
-
String comparisons
like,starts(with:),ends(with:),in
-
Collection operations
contains(_:)
-
Predicate literals
true,false,NSPredicate(for composing custom prdicates using an expression string for a predicate type that does not yet exist in the DSL)
-
Operators
==,!=,<,<=,>,>=,&&,||,!
-
#PredicateBuildermacro for Swift 5.9 users -
Disallow
Foundation.Predicatetypes in the DSL- While in beta at the time of writing, the
#Predicatemacro does not offer as much type safety when converting itself toNSPredicate--and contains some of the same runtime crash pitfalls as the string-based predicate expression language. This restriction will be re-evaluated when Swift 5.9 is fully-released.
- While in beta at the time of writing, the
-
Allow
TypedPredicatetypes to be constructed with a key path which is agnostic about the optionality of itsValue -
Constrain the builder to
NSManagedObjectsubclasses.- This allows for enhanced type safety over the previous
NSObjectconstraint, as@NSManagedstored properties are guaranteed to be operable with the predicate expression language
- This allows for enhanced type safety over the previous