diff --git a/CHANGELOG.md b/CHANGELOG.md index 03099884..dc21670d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Added `instance DefaultFromField (T.SqlArray_ Nullable a) [Maybe b]` + * Changed `ascNullsFirst` and `descNullsLast` to work with nullable fields. This rectifies an oversight from the `Column` to `Field` change. This may technically be a PVP violation but I think the diff --git a/src/Opaleye/Internal/RunQuery.hs b/src/Opaleye/Internal/RunQuery.hs index 183fad9b..0cef76de 100644 --- a/src/Opaleye/Internal/RunQuery.hs +++ b/src/Opaleye/Internal/RunQuery.hs @@ -321,6 +321,10 @@ instance (Typeable b, DefaultFromField a b) => DefaultFromField (T.SqlRange a) (PGSR.PGRange b) where defaultFromField = fromFieldRange defaultFromField +instance (Typeable b, DefaultFromField a b) => + DefaultFromField (T.SqlArray_ Nullable a) [Maybe b] where + defaultFromField = fromFieldArrayNullable defaultFromField + fromFieldRange :: Typeable b => FromField a b -> FromField (T.SqlRange a) (PGSR.PGRange b)