English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[ANN] ORM-0.5 and Dyntype-0.7
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-02-18 (12:20)
From: Thomas Gazagnaire <ocaml@g...>
Subject: [ANN] ORM-0.5 and Dyntype-0.7
We are pleased to announce a beta release of an Object-Relational Mapper
(ORM) library for OCaml.  It is implemented as a type-conv syntax extension
which auto-generates database save and query functions based on type

You can obtain the ORM from Github at http://github.com/mirage/orm , and
GODI packages and MacPorts will be available shortly.  Please report issues
to mirage@recoil.org or use the Github issue tracker.

Some example code is:

type t = { foo: string; bar: int } with orm
let db = t_init "my.db" in
t_save { foo="t1"; bar=1 } db;
t_get ~foo:(`Contains "t") db

The only backend supported currently in SQLite, but we are working on some
alternative non-SQL backends (such as Tokyo Cabinet and a git-based version
controlled database).  This beta release is a preview to get feedback and
testing from a wider audience.

The Dyntype library provides a convenient way of manipulating types and
values at run-time without having to dive into camlp4.  It is described more
fully in a WGT2010 paper at:

Thomas Gazagnaire
Anil Madhavapeddy