The esqueleto package
esqueleto is a bare bones, type-safe EDSL for SQL queries that works with unmodified persistent SQL backends. Its language closely resembles SQL, so you don't have to learn new concepts, just new syntax, and 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.
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, including with filters, it does not try to support some of the features that are specific to SQL backends. In particular, esqueleto is the recommended library for type-safe JOINs on persistent SQL backends. (The alternative is using raw SQL, but that's error prone and does not offer any composability.)
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/bitemyapp/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.
Properties
Versions | 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 (info) |
---|---|
Dependencies | base (>=4.5 && <5.0), blaze-html, bytestring, conduit (>=1.1), monad-logger, persistent (>=2.5 && <2.7), resourcet (>=1.1), tagged (>=0.2), text (>=0.11 && <1.3), transformers (>=0.2), unordered-containers (>=0.2) [details] |
License | BSD3 |
Copyright | (c) 2012-2016 Felipe Almeida Lessa |
Author | Felipe Lessa |
Maintainer | cma@bitemyapp.com |
Stability | Unknown |
Category | Database |
Home page | https://github.com/bitemyapp/esqueleto |
Source repository | head: git clone git://github.com/bitemyapp/esqueleto.git |
Uploaded | Sun Jan 22 18:55:30 UTC 2017 by bitemyapp |
Distributions | Arch:2.5.1, Debian:2.4.1, FreeBSD:2.4.1, LTSHaskell:2.5.1, NixOS:2.5.1, Stackage:2.5.1, Tumbleweed:2.5.1 |
Downloads | 27218 total (84 in the last 30 days) |
Votes | |
Status | Docs available [build log] Last success reported on 2017-01-22 [all 1 reports] |
Flags
Name | Description | Default | Type |
---|---|---|---|
postgresql | test postgresql. default is to test sqlite. | Disabled | Automatic |
mysql | test MySQL/MariaDB. default is to test sqlite. | Disabled | Automatic |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- esqueleto-2.5.1.tar.gz [browse] (Cabal source package)
- Package description (included in the package)