Persistence interface for Haskell allowing multiple storage methods.
Switch branches/tags
v2.5.1.4 pool-conduit/0.1.2.3 pool-conduit/0.1.2.2 pool-conduit/0.1.2.1 pool-conduit/0.1.2 pool-conduit/0.1.1 persitent-template/2.1.5 persitent-mongoDB/2.5.0.1 persistent/2.7.3.1 persistent/2.7.3 persistent/2.7.2 persistent/2.7.1 persistent/2.6 persistent/2.2.4.1 persistent/2.2.4 persistent/2.2.3 persistent/2.2.2.1 persistent/2.2.2 persistent/2.2.1 persistent/2.2 persistent/2.1.6 persistent/2.1.4 persistent/2.1.2 persistent/2.1.1.6 persistent/2.1.1.5 persistent/2.1.1.3 persistent/2.1.1.2 persistent/2.1.1.1 persistent/2.1.1 persistent/2.1.0.1 persistent/2.1 persistent/2.0.8 persistent/2.0.7 persistent/2.0.5.1 persistent/2.0.5 persistent/2.0.4 persistent/2.0.3.1 persistent/2.0.3 persistent/2.0.2 persistent/2.0.1.1 persistent/2.0.1 persistent/2.0.0.1 persistent/2.0.0 persistent/1.3.3 persistent/1.3.2 persistent/1.3.1.1 persistent/1.3.1 persistent/1.3.0.6 persistent/1.3.0.5 persistent/1.3.0.4 persistent/1.3.0.3 persistent/1.3.0.2 persistent/1.3.0 persistent/1.2.3.3 persistent/1.2.3.2 persistent/1.2.1.1 persistent/1.2.1 persistent/1.2.0.1 persistent/1.2.0 persistent/1.1.5.1 persistent/1.1.5 persistent/1.1.4 persistent/1.1.3.2 persistent/1.1.3.1 persistent/1.1.3 persistent/1.1.2 persistent/1.1.0.1 persistent/1.1.0 persistent/1.0.2.2 persistent/1.0.2.1 persistent/1.0.2 persistent/1.0.1.3 persistent/1.0.1.2 persistent/1.0.1.1 persistent/1.0.1 persistent/1.0.0 persistent/0.9.0.4 persistent/0.9.0.3 persistent/0.9.0 persistent/0.5.1 persistent/0.5.0 persistent/0.4.2 persistent/0.4.1 persistent/0.4.0.1 persistent/0.4.0 persistent/0.3.1.1 persistent/0.3.1 persistent/0.3.0.1 persistent/0.3.0 persistent/0.2.4 persistent/0.2.3 persistent/0.2.2.2 persistent/0.2.2.1 persistent/0.2.2 persistent/0.2.1 persistent/0.2.0.2 persistent/0.2.0.1 persistent/0.2.0 persistent/0.1.0 persistent/0.0.0.1
Nothing to show
Clone or download
Latest commit f616856 Oct 14, 2018
Permalink
Failed to load latest commit information.
.github Add Github templates and files to help with reproducing issues Dec 31, 2017
bin add testing setup for postgres Dec 7, 2017
docs Documenting sql= for unique indices Apr 12, 2018
experimental/couchDB Up dependency on the base package to >= 4.6 (removes GHC 7.4 support) Feb 26, 2015
persistent-mongoDB Fixes for older LTSes Feb 1, 2018
persistent-mysql More version number fixes Oct 14, 2018
persistent-postgresql More version number fixes Oct 14, 2018
persistent-qq Fix a version bound Oct 14, 2018
persistent-redis Fix persistent-redis bounds Jan 6, 2018
persistent-sqlite More version number fixes Oct 14, 2018
persistent-template Insert TH version check Aug 17, 2018
persistent-test Updated test to be more backend/PK type agnostic. Oct 3, 2018
persistent-zookeeper Merge branch 'http-api-data-release' Apr 11, 2016
persistent Fix version numbers Oct 14, 2018
travis Turn off --pedantic for lts-7 Feb 1, 2018
.dockerignore improve Docker build Oct 29, 2014
.gitattributes Fix language stat(s) for persistent repo. (#663) Apr 10, 2017
.gitignore ignore .hspec-failures Apr 11, 2018
.gitmodules Remove scripts submodule Dec 10, 2014
.travis.yml Remove unneeded after_failure Feb 1, 2018
CONTRIBUTING.md Document building a subset of targets. (#809) May 9, 2018
LICENSE Update license with MIT license Apr 27, 2012
README.md Document building a subset of targets. (#809) May 9, 2018
development.md Document building a subset of targets. (#809) May 9, 2018
docker-compose.yml add testing setup for postgres Dec 7, 2017
justfile a better docker-based testing approach Dec 5, 2017
sources.txt Add persistent-zookeeper for persistent-2.1.* Nov 26, 2014
stack-docker.yaml Create separate persistent-qq (fixes #827) Aug 26, 2018
stack.yaml Create separate persistent-qq (fixes #827) Aug 26, 2018

README.md

Learn more: http://yesodweb.com/book/persistent

Join the chat at https://gitter.im/yesodweb/persistent

Build Status

A Haskell datastore. Datastores are often referred to as "ORM"s. While 'O' traditionally means object, the concept can be generalized as:

avoidance of boilerplate serialization

In addition , the ORM concept is a way to make what is usually an un-typed driver type-safe. In dynamic languages rather than compile time errors, safety comes from creating specific dynamic errors rather than sending nonsense queries to the database.

Persistent's goal is to catch every possible error at compile-time, and it comes close to that.

Backend agnostic

Supports PostgreSql, Sqlite, MongoDB, Redis, ZooKeeper, and many other databases via persistent-odbc. The MySQL backend is in need of a maintainer. Currently there are issues with migrations and support for composite and primary keys is lacking.

Persistent is designed to be adaptable to any datastore, and to allow multiple datastores to be used simultaneously. The serialization layer should be adaptable to any datastore.

Providing a universal query layer will always be limiting. A major limitation for SQL databases is that the persistent library does not directly provide joins. However, you can use Esqueleto with Persistent's serialization to write type-safe SQL queries. Key-value stores such as Redis can be used with persistent, but only fill out the key-value portion of the API (PersistStore) rather than the query portion (PersistQuery).

Persistent provides several hooks to create backend-specific functionality. One can always fall back to using the raw database driver or other lower-level or less type-safe libraries and can utilize Persistent for un-serializing the database response to a Haskell record.

Install from source

Clone the repo and run stack build to build all targets. Persistent supports many backends. If you have only some of these installed the development doc shows how to build against a subset of targets.