packages feed

hasql-dynamic-statements 0.1.0.1 → 0.1.0.2

raw patch · 3 files changed

+5/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

hasql-dynamic-statements.cabal view
@@ -1,5 +1,5 @@ name: hasql-dynamic-statements-version: 0.1.0.1+version: 0.1.0.2 synopsis: Toolkit for constructing Hasql statements dynamically description:   This library introduces into the Hasql ecosystem a new abstraction named Snippet,
library/Hasql/DynamicStatements/Snippet/Defs.hs view
@@ -14,7 +14,7 @@ Here's an example:  @-selectSubstring :: Text -> Maybe Int64 -> Maybe Int64 -> 'Snippet'+selectSubstring :: Text -> Maybe Int32 -> Maybe Int32 -> 'Snippet' selectSubstring string from to =   "select substring(" <> 'param' string <>   'foldMap' (\\ x -> " from " <> 'param' x) from <>
library/Hasql/DynamicStatements/Statement.hs view
@@ -19,12 +19,12 @@ Here's an example:  @-selectSubstring :: Text -> Maybe Int64 -> Maybe Int64 -> 'Statement' () Text+selectSubstring :: Text -> Maybe Int32 -> Maybe Int32 -> 'Statement' () Text selectSubstring string from to = let   snippet =     "select substring(" <> Snippet.'SnippetDefs.param' string <>     foldMap (mappend " from " . Snippet.'SnippetDefs.param') from <>-    foldMap (mappend " to " . Snippet.'SnippetDefs.param') to <>+    foldMap (mappend " for " . Snippet.'SnippetDefs.param') to <>     ")"   decoder = Decoders.'Decoders.singleRow' (Decoders.'Decoders.column' Decoders.'Decoders.text')   in 'dynamicallyParameterized' snippet decoder@@ -33,7 +33,7 @@ Without the Snippet API you would have had to implement the same functionality thus:  @-selectSubstring' :: Text -> Maybe Int64 -> Maybe Int64 -> 'Statement' () Text+selectSubstring' :: Text -> Maybe Int32 -> Maybe Int32 -> 'Statement' () Text selectSubstring' string from to = let   sql = case (from, to) of     (Just _, Just _) -> "select substring($1 from $2 to $3)"