This is exactly what I was about to write for myself. It is a seriously lovely, very thin abstraction layer between the underlying database and the developer. Pure convenience (and abstraction from specific DB back-end), no ORM handholding. One thing which I always end up doing in other languages, but haven’t looked into for OCaml yet, is query fragments. For example in Perl, my pattern tends to be something like: my $query = 'WHERE x=y'; my @args; if ($something) { $query .= ' AND foo=?'; ...