You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Better support for optionals in queries (pointfreeco#61)
* Better support for optionals in queries
* Predicates (`where` and `having`) can return optional booleans.
* Add `QueryExpression<Optional>.map` for optionally building queries
on non-optional values.
For example, a comparison that might use the `#sql` macro as an escape
hatch can more safely and succinctly use `map`:
```diff
Reminder.where {
- #sql("\($0.dueDate) < \(Date())")
+ $0.dueDate.map { $0 < Date() }
}
```
* wip
* wip
* wip
* wip
* wip
* Add test for where clause with optional
* wip
---------
Co-authored-by: Brandon Williams <[email protected]>
0 commit comments