Rel
Relational database programming for OCaml (unreleased)
Install / Use
/learn @dbuenzli/RelREADME
rel — Relational database programming for OCaml
%%VERSION%%
Rel is a library for programming with relational databases in OCaml. It provides:
- Typed combinators to describe database rows and their representation as custom OCaml values.
- Typed combinators to describe database schemas. Schemas can be translated to SQL data definitions or, conversly, generated for existing databases (external schema definition).
- Automatic schema change computation via schema diffing.
- Raw SQL statements typing and SQL generation helpers (parametric on SQL dialect).
- Query language embedded in plain OCaml. Queries are typed, composable and compile to a single, flat, SQL query (experimental).
- Support for using SQLite3 databases.
Rel is distributed under the ISC license. The base library has no
dependencies. The Rel_cli library depends on cmdliner. The
Rel_sqlite3 library depends on the C SQLite3 library (at least
v3.38.5).
Homepage: https://erratique.ch/software/rel
Installation
rel can be installed with opam:
opam install rel
opam install rel conf-sqlite3 # with SQLite support
If you don't use opam consult the opam file for build
instructions.
Documentation
The documentation can be consulted online or via odig doc rel.
Questions are welcome but better reled on the OCaml forum than on the issue tracker.
Acknowledgements
The query language of Rel is based on the following line of papers.
-
Ezra Cooper. The Script-Writer’s Dream: How to Write Great SQL in Your Own Language, and Be Sure It Will Succeed. 2009. Full text
-
James Cheney et al. A practical theory of language-integrated query. 2013. Full text
-
Suzuki et al. Finally, safely-extensible and efficient language-integrated query. 2016. Full text
-
Oleg Kiselyov et al. Sound and Efficient Language-Integrated Query -- Maintaining the ORDER. 2017. Full text
Related Skills
feishu-drive
334.5k|
things-mac
334.5kManage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database)
clawhub
334.5kUse the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com
SchoolAnalytics
Skill: IB MYP Analytics & Grading Activation Trigger - Any task involving grade calculations, student flagging, or analytics dashboarding. - Questions about Criteria A, B, C, or D. Knowledge
