| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sat, 17 Jan 2026 12:08:06 GMT
X-Served-By: cache-dfw-kdfw8210103-DFW, cache-bom-vanm7210077-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768651686.093265,VS0,VE773
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
servant-db: Servant types for defining API with relational DBs
servant-db: Servant types for defining API with relational DBs
Downloads
- servant-db-0.2.0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.2.0.0, 0.2.0.1 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.7 && <5), servant (>=0.2 && <0.10) [details] |
| License | BSD-3-Clause |
| Copyright | 2016 (c) Anton Gushcha |
| Author | Anton Gushcha |
| Maintainer | ncrashed@gmail.com |
| Uploaded | by NCrashed at 2016-10-14T09:53:10Z |
| Distributions | |
| Reverse Dependencies | 1 direct, 1 indirect [details] |
| Downloads | 1575 total (7 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs uploaded by user Build status unknown [no reports yet] |
Readme for servant-db-0.2.0.1
[back to package description]servant-db
The idea of package is to provide servant-like DSL for specifying an API for functions stored in RDBMS.
data RegisterUser = RegisterUser {
userName :: Text
, userPassword :: Text
, userPhone :: Phone
, userEmail :: Email
}
type API =
ArgNamed "user" RegisterUser
:> ArgNamed "isAdmin" Bool
:> Procedure "registerUser" (Maybe (Only UserId))
:<|> ArgPos UserId
:> Procedure "getUser" (Maybe User)
:<|> Procedure "listUsers" [User]
The library adds three custom combinators:
-
ArgNamed name a- named argument of stored function of typea. -
ArgPos a- unamed argument of stored function of typea. -
Procedure name a- named stored function with return typea.
Related libraries:
- servant-db-postgresql - derives client for PostgreSQL with postgresql-query library.