composite-opaleye-0.8.0.0: Opaleye SQL for Vinyl records
Safe HaskellNone
LanguageHaskell2010

Composite.Opaleye.Util

Synopsis

Documentation

constantColumnUsing :: ToFields haskell (Field sqlType) -> (haskell' -> haskell) -> ToFields haskell' (Field sqlType') Source #

Coerce one type of Column ToFields profunctor to another using by just asserting the changed type on the column side and using the given function on the Haskell side. Useful when the PG value representation is the same but the Haskell type changes, e.g. for enums.