hasql-th 0.3.0.1 → 0.4
raw patch · 3 files changed
+6/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- hasql-th.cabal +1/−1
- library/Hasql/TH.hs +4/−0
- library/Hasql/TH/Exp.hs +1/−1
hasql-th.cabal view
@@ -1,5 +1,5 @@ name: hasql-th-version: 0.3.0.1+version: 0.4 category: Hasql, Database, PostgreSQL, Template Haskell synopsis: Template Haskell utilities for Hasql description:
library/Hasql/TH.hs view
@@ -18,6 +18,10 @@ > where id = $1 :: int4 > |] + As you can see, it completely eliminates the need to mess with codecs.+ The quasiquoters directly produce `Statement`,+ which you can then `dimap` over using its `Profunctor` instance to get to your domain types.+ === Nullability As you might have noticed in the example,
library/Hasql/TH/Exp.hs view
@@ -205,7 +205,7 @@ applyArray levels = AppE (VarE 'Encoders.array) . applyArrayDimensionality levels applyArrayDimensionality levels = if levels > 0- then AppE (AppE (VarE 'Encoders.dimension) (VarE 'foldl')) . applyArrayDimensionality (pred levels)+ then AppE (AppE (VarE 'Encoders.dimension) (VarE 'Vector.foldl')) . applyArrayDimensionality (pred levels) else AppE (VarE 'Encoders.element) applyNullability nullable = AppE (VarE (if nullable then 'Encoders.nullable else 'Encoders.nonNullable)) in \ (Extraction.Encoder valueEncoderName valueNull dimensionality arrayNull) ->