packages feed

hasql-mapping 0.1 → 0.1.0.1

raw patch · 2 files changed

+21/−8 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

hasql-mapping.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: hasql-mapping-version: 0.1+version: 0.1.0.1 synopsis: SDK for defining modular mappings to databases on top of Hasql description:   SDK for defining mappings to databases using Hasql that promotes modular design.
src/library/Hasql/Mapping/IsScalar.hs view
@@ -22,89 +22,102 @@   encoder :: Encoders.Value a   decoder :: Decoders.Value a --- Numeric types+-- | Maps to PostgreSQL @bool@. instance IsScalar Bool where   encoder = Encoders.bool   decoder = Decoders.bool +-- | Maps to PostgreSQL @int2@. instance IsScalar Int16 where   encoder = Encoders.int2   decoder = Decoders.int2 +-- | Maps to PostgreSQL @int4@. instance IsScalar Int32 where   encoder = Encoders.int4   decoder = Decoders.int4 +-- | Maps to PostgreSQL @int8@. instance IsScalar Int64 where   encoder = Encoders.int8   decoder = Decoders.int8 +-- | Maps to PostgreSQL @int8@. instance IsScalar Int where   encoder = fromIntegral >$< Encoders.int8   decoder = fromIntegral <$> Decoders.int8 +-- | Maps to PostgreSQL @float4@. instance IsScalar Float where   encoder = Encoders.float4   decoder = Decoders.float4 +-- | Maps to PostgreSQL @float8@. instance IsScalar Double where   encoder = Encoders.float8   decoder = Decoders.float8 +-- | Maps to PostgreSQL @numeric@. instance IsScalar Scientific where   encoder = Encoders.numeric   decoder = Decoders.numeric --- Text types+-- | Maps to PostgreSQL @text@. instance IsScalar Text where   encoder = Encoders.text   decoder = Decoders.text --- Binary types+-- | Maps to PostgreSQL @bytea@. instance IsScalar ByteString where   encoder = Encoders.bytea   decoder = Decoders.bytea --- Date/Time types+-- | Maps to PostgreSQL @date@. instance IsScalar Day where   encoder = Encoders.date   decoder = Decoders.date +-- | Maps to PostgreSQL @timestamp@. instance IsScalar LocalTime where   encoder = Encoders.timestamp   decoder = Decoders.timestamp +-- | Maps to PostgreSQL @timestamptz@. instance IsScalar UTCTime where   encoder = Encoders.timestamptz   decoder = Decoders.timestamptz +-- | Maps to PostgreSQL @time@. instance IsScalar TimeOfDay where   encoder = Encoders.time   decoder = Decoders.time +-- | Maps to PostgreSQL @timetz@. instance IsScalar (TimeOfDay, TimeZone) where   encoder = Encoders.timetz   decoder = Decoders.timetz +-- | Maps to PostgreSQL @interval@. instance IsScalar DiffTime where   encoder = Encoders.interval   decoder = Decoders.interval --- UUID+-- | Maps to PostgreSQL @uuid@. instance IsScalar UUID where   encoder = Encoders.uuid   decoder = Decoders.uuid --- Network types+-- | Maps to PostgreSQL @inet@. instance IsScalar IPRange where   encoder = Encoders.inet   decoder = Decoders.inet +-- | Maps to PostgreSQL @macaddr@. instance IsScalar (Word8, Word8, Word8, Word8, Word8, Word8) where   encoder = Encoders.macaddr   decoder = Decoders.macaddr --- JSON types+-- | Maps to PostgreSQL @jsonb@. instance IsScalar Aeson.Value where   encoder = Encoders.jsonb   decoder = Decoders.jsonb