* ANN: OCaml/Sqlite ORM layer (preview 0.2)
@ 2009-06-02 17:20 Anil Madhavapeddy
0 siblings, 0 replies; only message in thread
From: Anil Madhavapeddy @ 2009-06-02 17:20 UTC (permalink / raw)
To: OCaml
I've been using OCaml in a few server projects which need a light-
weight database, and so I wrote a library to map OCaml objects
directly to a SQLite3 backend database.
Like other ORM systems, you define a schema based on sets of named
fields. The Sql_orm library then generates an OCaml module and
interface with static accessor methods which take care of all the
tedious SQL interactions and provide you with a nice high-level,
statically type-safe access method.
It's still early days but the library is very functional and stable.
I've put up docs and instructions at:
http://wiki.github.com/avsm/ocaml-orm-sqlite
It's currently written as a module which outputs OCaml directly, and
once I'm happy with the feature-set, I intend to port it to use camlp4
so that schemas can be declared directly without the need to
regenerate a separate ML file.
You can view an example schema at: http://tinyurl.com/sqlorm-example
- schema.ml declares the fields
- test.ml uses it
- my_db.* are the generated files.
- the tests/ directory has more advanced usage, such as foreign keys
and so on.
-anil
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-02 17:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-02 17:20 ANN: OCaml/Sqlite ORM layer (preview 0.2) Anil Madhavapeddy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox