persistent-template

Type-safe, non-relational, multi-backend persistence.

http://www.yesodweb.com/book/persistent

Version on this page:2.7.2
LTS Haskell 22.14:2.12.0.0
Stackage Nightly 2024-03-29:2.12.0.0
Latest on Hackage:2.12.0.0

See all snapshots persistent-template appears in

MIT licensed by Michael Snoyman
This version can be pinned in stack with:persistent-template-2.7.2@sha256:aa4a11b1bc09967c9bb2e0324c358f4061b54da703705294040b32d70d73c12f,2703

Module documentation for 2.7.2

persistent-template

Provides Template Haskell helpers for persistent. For more information, see the chapter in the Yesod book.

code organization

The TH.hs module contains code generators. persistent-template uses EntityDefs that it gets from the quasi-quoter. The quasi-quoter is in persistent Quasi.hs Similarly mant of the types come from the persistent library

Changes

2.7.2

  • Expose the knot tying logic of parseReferences so that users can build migrations from independently define entities at runtime #932

2.7.1

  • Add the mkEntityDefList function to work around #902. #904

2.7.0

  • Depends on persistent-2.10.0 which provides the OnlyOneUniqueKey and AtLeastOneUniqueKey classes. Automatically generates instances for these classes based on how many unique keys the entity definition gets. This changes requires UndecidableInstances to be enabled on each module that generates entity definitions. #885
  • Removed deprecated sqlOnlySettings. Please use sqlSettings instead. #894

2.6.0

2.5.4

2.5.3.1

  • Slight improvement to the error message when a Persistent field can’t be parsed from database results

2.5.3

  • Exposed parseReferences to allow custom QuasiQuoters

2.5.2

  • Fix incorrect ToJSON/FromJSON instance generation for generic backends

2.5.1.6

Allow non-null self-references in a list

2.5.1.4

  • Allow composite Primary keys for tables that contain nullable fields.
  • Support foreign keys to non-integer ids

2.5.1.3

  • fix GHC 7.8 bug when a field name is “type”

2.5.1.2

  • fix a bad Eq instance /= definition for Key when mpsGenetric=True

2.5.0.1

  • workaround TH bug in GHC 7.10

2.5

  • read/write typeclass split

2.1.6

  • aeson 0.11
  • transformers 0.5

2.1.4

support http-api-data for url serialization

2.1.3.3

By default explicitly use Int64 for foreign key references. This avoids confusion on a 32 bit system.

2.1.3.1

Support foreign key references to composite primary keys

2.1.0.1

Support for monad-control 1.0