This library maps your datatypes to a relational model, in a way similar to what ORM libraries do in object-oriented programming. The mapping can be configured to work with almost any schema. Groundhog supports schema migrations, composite keys, advanced expressions in queries, and much more. See tutorial and examples on GitHub.


* Pass type information along the UntypedExpr
* Fix #57 (table indexes are ignored)

* Support for GHC 8.4
* New typeclass to allow transaction rollback through ExceptT

* Simplified signatures for PurePersistField and PrimitivePersistField
* Basic support for streaming API
* Support for GHC 8
* Add attoparsec dependency
* Bump blaze-builder dependency
* Support for monad-control 1.0

* Removed logger argument from executeMigration and runMigration
* PersistField instance for lazy ByteString

* 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

* DISTINCT select option
* Support entities with no fields
* Added getCurrentSchema function into SchemaAnalyzer

* Reimplemented projections with constraint kinds
* Moved QueryRaw constraint into class SqlDb simplifying SQL function signatures
* Compatibility with GHC 7.8
* Create missing schemas (or databases in MySQL terminology) during migration
* Replaced datatype Proxy with type variable

* Cond can be used as expression
* Expressions instances for Fractional, Floating, Integral
* Operator case_

* Added functions replaceBy and deleteAll
* Renamed deleteByKey to deleteBy
* Instances of UTCTime and ZonedTime can read both values with time zone and without it
* Added function runDbConnNoTransaction to run a monadic action without creating a transaction around it
* Fix for nullable fields in unique constraint
* Added migration helper function Database.Groundhog.Generic.getQueries
* Added comparison function Database.Groundhog.Expression.isFieldNothing

* References to tables not mapped by groundhog
* Default column values
* Better type inference for expressions
* Constructor for empty condition CondEmpty
* Logging queries based on monad-logger

* Removed superclass constraints SinglePersistField and PurePersistField for PrimitivePersistField
* Fixed prefixing columns of nested embedded datatypes when not all names are specified

* Custom compositional functions and operators
* ConnectionManager which helps to extract connections from pools, application state, etc.
* Support for savepoints
* Schema qualified tables
* Added unique constraints of type PRIMARY
* Reference clauses ON DELETE and ON UPDATE.
* Exposed database introspection capabilities with class SchemaAnalyzer

* Database indexes
* Support DB-specific column types
* Renaming and refactoring
* Removed overly restrictive upper bound for bytestring package
* Compatibility with GHC 7.6

The library was almost completely overhauled.
* Support for embedded datatypes
* New syntax for select
* Embedded datatypes
* Composite foreign keys and natural keys
* Projections of datatype fields
* Codegeneration modules are moved to groundhog-th package

The first release. It has support for polymorphic datatypes and sum types.
comments powered byDisqus