database-id-class 0.1.0.0 → 0.1.0.1
raw patch · 3 files changed
+20/−1 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- README.md +14/−0
- database-id-class.cabal +2/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for database-id-class +## 0.1.0.1++* Add readme+ ## 0.1.0.0 * Initial release. Contains HasId class and associated instances.
+ README.md view
@@ -0,0 +1,14 @@+database-id-class+-----------------++This package defines a (parametric) data type `Id a` used to refer to the primary key of values of type `a` in a database.++ newtype Id a = Id { unId :: IdData a }++Here, `IdData` is a type family associated with the `HasId` class:++ class HasId a where+ type IdData a :: *+ type IdData a = Int64++It defaults to `Int64` because that tends to be the type you want for tables with an autoincrement primary key.
database-id-class.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: database-id-class-version: 0.1.0.0+version: 0.1.0.1 synopsis: Class for types with a database id description: Class for types with a database id -- bug-reports:@@ -12,6 +12,7 @@ category: Database build-type: Simple extra-source-files: CHANGELOG.md+ README.md library exposed-modules: Database.Id.Class