package ez_pgocaml
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=57b409aeef2e0e5e372ba23d4ca40a5e62f5d85d3a69aeab301d0670da4a986c
Description
Added to opam-repository:
README
ez_pgocaml : a simple library to work with pgocaml
Installation
To build:
opam pin .
opam install ez_pgocamlUsage
A typical usage is to create a database migration tool for your application:
The file updater.ml contains:
let () =
EzPGUpdater.main Versions.database Versions.versionswhere versions.ml contains:
let database = "testdb"
let update_0_to_1 dbh =
EzPG.exec dbh
(Printf.sprintf "CREATE TABLE %s (%s)"
"users"
{|
user_id bigserial PRIMARY KEY,
login VARCHAR NOT NULL,
pwhash bytea NOT NULL
|})
let update_1_to_2 dbh =
EzPG.exec dbh
(Printf.sprintf "CREATE TABLE %s (%s)"
"infos"
{|
user_id bigserial PRIMARY KEY,
city VARCHAR
|})
let versions = [
0, update_0_to_1;
1, update_1_to_2;
]When ran, the corresponding executable will try to migrate the database from any version to the latest (2 in this example).
Dev Dependencies
None
Optional Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building ez_pgocaml with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 1.0.0 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure