Type-safe datatype-database mapping library.

LTS Haskell 11.1:
Stackage Nightly 2018-03-12:
Latest on Hackage:

See all snapshots groundhog-th appears in

BSD3 licensed and maintained by Boris Lykah

Module documentation for

This library helps to generate instances for Groundhog datatypes.

* Fixed Template Haskell incomplete patterns
* Compatibility with template-haskell-2.12

* Support for GHC 8
* Generation of instances for newtype
* Converter functions for primitive datatypes
* Compatibility with template-haskell-2.10

* Instances of ToJSON for settings
* Refactoring and export of some utility functions

* Entities without keys. It can be useful for many-to-many tables which hold keys but are not referenced
* Entity and fields descriptions are parameterized so that they can be promoted
* Entity and fields descriptions are dependent on database proxy. It allows to use different types depending on a database, for example, the same type can be array[] in PostgreSQL and varchar elsewhere
* Migration support for indexes on expressions

* Export firstChar for creating user naming styles
* Support entities with no fields

* Compatibility with GHC 7.8
* Create missing schemas (or databases in MySQL terminology) during migration
* Replace datatype Proxy with type variable

* Switched from utf8-string to text
* Added "primitive" mapping which creates PrimitivePersistField instances based on Show/Read or Enum.
* Fixed order of unique constraint fields
* Fixed a warning in generated code

* References to tables not mapped by groundhog
* Default column values
* Check for already existing unique key phantom datatypes

* Generation of SinglePersistField and PurePersistField instances for keys

* Reference clauses ON DELETE and ON UPDATE
* Schema qualification
* Added unique constraints of type PRIMARY

* Improvements of YAML parsing error reporting
* Database indexes
* Support DB-specific column types
* Removed upper bound for bytestring
* Support embedded datatypes as part of an unique constraint
* Removed upper bound for yaml
* Removed upper bound for containers

The first release. The modules were moved from the groundhog package.
comments powered byDisqus