@@ -81,6 +81,15 @@ instance FromValue 'PGTimestampTZ UTCTime where
81instance FromValue 'PGInterval DiffTime where
81instance FromValue 'PGInterval DiffTime where
82 fromValue _ = Decoder.interval_int
82 fromValue _ = Decoder.interval_int
84+class FromValues pgs xs where
85+ decodeValues :: Proxy# pgs -> Rec (Const ByteString) xs -> Rec (Either Text) xs
86+instance FromValues '[] '[] where decodeValues _ _ = RNil
87+instance (FromValue pg x, FromValues pgs xs)
88+ => FromValues (pg ': pgs) (x ': xs) where
89+ decodeValues _ (Const result :& results) =
90+ decodeValue (proxy# :: Proxy# pg) result
91+ :& decodeValues (proxy# :: Proxy# pgs) results
84class ToValue x (pg :: PGType) where
93class ToValue x (pg :: PGType) where
85 toValue :: Proxy# pg -> Encoder x
94 toValue :: Proxy# pg -> Encoder x
86instance ToValue Int16 'PGInt2 where
95instance ToValue Int16 'PGInt2 where