forkkit / reldb

Relational database programming for OCaml

Home Page:https://erratique.ch/software/rel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rel — Relational database programming for OCaml

%%VERSION%%

Rel is a library for programming with relational databases in OCaml. It provides:

  • Typed combinators to describe tables and their representation by client-defined OCaml values.
  • Automatic database row and OCaml values translations from the table descriptions.
  • SQL data definition generation from the table descriptions.
  • A mechanism for typing SQL statement parameters and results.
  • SQL generation helpers.
  • A query language embedded in plain OCaml. Queries are typed, composable and compile to a single, flat, SQL query (experimental).
  • Support for SQLite3 databases (optional). Run SQL statements and generate OCaml table descriptions for existing databases.

Rel is distributed under the ISC license. The basic library has no dependencies.

The SQLite support depends on the C SQLite3 library (at least v3.26.2).

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

About

Relational database programming for OCaml

https://erratique.ch/software/rel

License:ISC License


Languages

Language:OCaml 95.7%Language:C 4.3%