packages feed

mysql-json-table 0.1.3.0 → 0.1.4.0

raw patch · 4 files changed

+8/−3 lines, 4 filesdep +hashable

Dependencies added: hashable

Files

changelog.md view
@@ -1,3 +1,6 @@+## 0.1.4.0+* Add `Hashable` instance for the `Id` type.+ ## 0.1.3.0 * New instances for `Id`:   - `FromJSONKey`
license view
@@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Daniel Díaz Casanueva+Copyright (c) 2024 Daniel Díaz Casanueva  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
mysql-json-table.cabal view
@@ -1,5 +1,5 @@ name: mysql-json-table-version: 0.1.3.0+version: 0.1.4.0 category: Database synopsis: Using MySQL to store id-to-json tables. description: Visit the homepage for more information, or read the readme.@@ -29,6 +29,7 @@     , conduit     , exceptions     , http-api-data+    , hashable   exposed-modules: Database.MySQL.JSONTable  executable mysql-json-table-test
src/Database/MySQL/JSONTable.hs view
@@ -76,6 +76,7 @@ import Conduit (ResourceT) import Data.Conduit qualified as Conduit import Web.HttpApiData (FromHttpApiData, ToHttpApiData)+import Data.Hashable (Hashable)  -- | Open a connection to a MySQL server and apply a function to it. --   The connection is closed both when the function completes or throws an exception.@@ -87,7 +88,7 @@ --   stored in the table. newtype Id a = Id { fromId :: Word64 }   deriving ( Eq, Ord, Show, ToJSON, FromJSON, FromJSONKey, ToJSONKey-           , FromHttpApiData, ToHttpApiData)+           , FromHttpApiData, ToHttpApiData, Hashable )  instance SQL.FromField (Id a) where   fromField = ([SQLBase.LongLong], fmap Id . readEither . CByteString.unpack)