selda: Multi-backend, high-level EDSL for interacting with SQL databases.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

This package provides an EDSL for writing portable, type-safe, high-level database code. Its feature set includes querying and modifying databases, automatic, in-process caching with consistency guarantees, and transaction support. See the project website for a comprehensive tutorial. To use this package you need at least one backend package, in addition to this package. There are currently two different backend packages: selda-sqlite and selda-postgresql.

[Skip to Readme]


Versions,,,,,,,,,,,,,,,,,,,, 0.1.12,,,,,,,,,,,,,
Change log
Dependencies base (>=4.9 && <5), bytestring (>=0.10 && <0.11), containers (>=0.4 && <0.7), exceptions (>=0.8 && <0.11), ghc-prim (>=, mtl (>=2.0 && <2.3), random (>=1.1 && <1.2), text (>=1.0 && <1.3), time (>=1.5 && <1.10), uuid-types (>=1.0 && <1.1) [details]
License MIT
Author Anton Ekblad
Category Database
Home page
Source repo head: git clone
Uploaded by AntonEkblad at 2020-01-20T18:17:14Z


[Index] [Quick Jump]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Readme for selda-

[back to package description]


Join the chat at Hackage IRC channel MIT License Build Status Hackage Dependencies

What is Selda?

Selda is a Haskell library for interacting with SQL-based relational databases. It was inspired by LINQ and Opaleye.


Getting started

Install the selda package from Hackage, as well as at least one of the backends:

$ cabal update
$ cabal install selda selda-sqlite selda-postgresql

Then, read the tutorial. The API documentation will probably also come in handy.


Selda requires GHC 8.0+, as well as SQLite 3.7.11+ or PostgreSQL 9.4+. To build the SQLite backend, you need a C compiler installed. To build the PostgreSQL backend, you need the libpq development libraries installed (libpq-dev on Debian-based Linux distributions).



All forms of contributions are welcome!

If you have a bug to report, please try to include as much information as possible, preferably including:

Bonus points for a small code example that illustrates the problem.

If you want to contribute code, please consult the following checklist before sending a pull request:

If you want to contribute code but don't really know where to begin, issues tagged good first issue are a good start.

Setting up the build environment

From the repository root:

Setting up a VM for PostgreSQL testing

While the SQLite backend is completely self-contained, the PostgreSQL backend needs an appropriate server for testing. Setting this up in a virtual machine is definitely less intrusive than setting up a server on your development machine. To set up a VM for the PostgreSQL backend tests:


Features that would be nice to have but are not yet implemented.