esqueleto: Bare bones, type-safe EDSL for SQL queries on persistent backends.

[ bsd3, database, library ] [ Propose Tags ] [ Report a vulnerability ]

persistent is a library for type-safe data serialization. It has many kinds of backends, such as SQL backends (persistent-mysql, persistent-postgresql, persistent-sqlite) and NoSQL backends (persistent-mongoDB).

While persistent is a nice library for storing and retrieving records, currently it has a poor interface for SQL backends compared to SQL itself. For example, it's extremely hard to do a type-safe JOIN on a many-to-one relation, and simply impossible to do any other kinds of JOINs (including for the very common many-to-many relations). Users have the option of writing raw SQL, but that's error prone and not type-checked.

esqueleto is a bare bones, type-safe EDSL for SQL queries that works with unmodified persistent SQL backends. Its language closely resembles SQL, so (a) you don't have to learn new concepts, just new syntax, and (b) it's fairly easy to predict the generated SQL and optimize it for your backend. Most kinds of errors committed when writing SQL are caught as compile-time errors---although it is possible to write type-checked esqueleto queries that fail at runtime.

Currently, SELECTs, UPDATEs, INSERTs and DELETEs are supported. Not all SQL features are available, but most of them can be easily added (especially functions), so please open an issue or send a pull request if you need anything that is not covered by esqueleto on https://github.com/meteficha/esqueleto/.

The name of this library means "skeleton" in Portuguese and contains all three SQL letters in the correct order =). It was inspired by Scala's Squeryl but created from scratch.

Modules

[Last Documentation]

  • Database
    • Database.Esqueleto
      • Internal
        • Database.Esqueleto.Internal.Language
        • Database.Esqueleto.Internal.Sql

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.2, 1.2.1, 1.2.2, 1.2.2.1, 1.2.3, 1.2.4, 1.3, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.4.2, 1.3.4.3, 1.3.4.4, 1.3.4.5, 1.3.4.6, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11, 1.3.12, 1.4, 1.4.1, 1.4.1.1, 1.4.1.2, 1.4.1.3, 1.4.2, 1.4.3, 1.4.4, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.1.1, 2.1.2, 2.1.2.1, 2.1.2.2, 2.1.2.3, 2.1.3, 2.2, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.2.9, 2.2.10, 2.2.11, 2.2.12, 2.3.0, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.7.0, 3.0.0, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.2.0, 3.2.2, 3.2.3, 3.3.0, 3.3.1, 3.3.1.1, 3.3.2, 3.3.3.0, 3.3.3.1, 3.3.3.2, 3.3.3.3, 3.3.4.0, 3.3.4.1, 3.4.0.0, 3.4.0.1, 3.4.1.0, 3.4.1.1, 3.4.2.0, 3.4.2.1, 3.4.2.2, 3.4.3.0, 3.5.0.0, 3.5.1.0, 3.5.2.0, 3.5.2.1, 3.5.2.2, 3.5.3.0, 3.5.3.1, 3.5.3.2, 3.5.4.0, 3.5.4.1, 3.5.4.2, 3.5.5.0, 3.5.6.1, 3.5.7.0, 3.5.7.1, 3.5.8.0, 3.5.8.1, 3.5.8.2, 3.5.9.0, 3.5.9.1, 3.5.10.0, 3.5.10.1, 3.5.10.2, 3.5.10.3, 3.5.11.0, 3.5.11.1, 3.5.11.2, 3.5.12.0, 3.5.13.0 (info)
Dependencies base (>=4.5 && <4.7), conduit, monad-logger, persistent (>=1.2 && <1.3), resourcet, tagged (>=0.2), text (>=0.11 && <0.12), transformers (>=0.2), unordered-containers (>=0.2) [details]
License BSD-3-Clause
Copyright (c) 2012 Felipe Almeida Lessa
Author Felipe Lessa
Maintainer felipe.lessa@gmail.com
Category Database
Home page https://github.com/meteficha/esqueleto
Source repo head: git clone git://github.com/meteficha/esqueleto.git
Uploaded by FelipeLessa at 2013-08-08T22:54:44Z
Distributions Arch:3.5.9.0, Debian:3.3.3.2, Fedora:3.5.10.0, FreeBSD:2.4.1, LTSHaskell:3.5.13.0, NixOS:3.5.11.2, Stackage:3.5.13.0
Reverse Dependencies 28 direct, 7 indirect [details]
Downloads 134596 total (753 in the last 30 days)
Rating 2.5 (votes: 5) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-20 [all 7 reports]