groundhog

Type-safe datatype-database mapping library. http://github.com/lykahb/groundhog

Version on this page:0.9.0
LTS Haskell 12.22:0.9.0
Stackage Nightly 2018-12-15:0.9.0
Latest on Hackage:0.9.0

See all snapshots groundhog appears in

BSD3 licensed and maintained by Boris Lykah

Module documentation for 0.9.0

There are no documented modules for this package.

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 https://www.fpcomplete.com/user/lykahb/groundhog and examples https://github.com/lykahb/groundhog/tree/master/examples on GitHub.

Changes

0.9.0
* Support for GHC 8.4

0.8.0.1
* New typeclass to allow transaction rollback through ExceptT

0.8
* Simplified signatures for PurePersistField and PrimitivePersistField
* Basic support for streaming API
* Support for GHC 8

0.7.0.3
* Add attoparsec dependency

0.7.0.2
* Bump blaze-builder dependency

0.7.0.1
* Support for monad-control 1.0

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

0.6.0
* 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

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

0.5.0
* Reimplemented projections with constraint kinds
* Moved QueryRaw constraint into class SqlDb simplifying SQL function signatures
* Compatibility with GHC 7.8

0.4.2.2
* Create missing schemas (or databases in MySQL terminology) during migration
* Replaced datatype Proxy with type variable

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

0.4.1
* Added functions replaceBy and deleteAll
* Renamed deleteByKey to deleteBy
* Instances of UTCTime and ZonedTime can read both values with time zone and without it

0.4.0.3
* Added function runDbConnNoTransaction to run a monadic action without creating a transaction around it

0.4.0.2
* Fix for nullable fields in unique constraint

0.4.0.1
* Added migration helper function Database.Groundhog.Generic.getQueries
* Added comparison function Database.Groundhog.Expression.isFieldNothing

0.4.0
* 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

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

0.3
* 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

0.2
* Database indexes
* Support DB-specific column types
* Renaming and refactoring

0.1.0.2
* Removed overly restrictive upper bound for bytestring package

0.1.0.1
* Compatibility with GHC 7.6

0.1.0
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

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