From: Jacques-Pascal Deplaix <jp.deplaix@gmail.com>
To: OCaml mailing list <caml-list@inria.fr>, ocsigen <ocsigen@inria.fr>
Subject: [Caml-list] [ANN] Macaque 0.7 and 0.7.1
Date: Thu, 09 Oct 2014 23:59:56 +0100 [thread overview]
Message-ID: <5437136C.3090102@gmail.com> (raw)
Hello,
We're happy to announce the double release of macaque 0.7 and 0.7.1.
Macaque is a type-safe and composable way to interact with SQL databases
from OCaml. We propose a form of "comprehension syntax" that allow to
modularly create queries in a strongly-typed and relatively principled way.
Macaque is hosted on github at:
https://github.com/ocsigen/macaque
The packages are available on opam.
Those two new releases come with some features and tiny breaking changes.
The new main features are:
- macaque now handles UNION, INTERSECT and EXCEPT:
* Postgresql documentation:
http://www.postgresql.org/docs/9.3/static/queries-union.html
* Macaque example: << union ({t.foo} | t in $table1$) ({t.foo} |
t in $table2$) ({t.foo} | t in $table3$) >>
- new aggregate function: md5:
* Postgresql documentation:
http://www.postgresql.org/docs/9.3/static/functions-string.html
* Macaque example: << group {hash = md5[t.foo]} | t in $table$ >>
- a new operator: IN:
* Postgresql documentation:
http://www.postgresql.org/docs/9.3/static/functions-comparisons.html#AEN18448
* Macaque example: << {t.foo} | t in $table$; in' t.id $ids$ >>
(where ids being a list of postgresql integers)
Breaking changes:
- We've fixed the type of current_timestamp so this should be
changed in your code (see the change bellow)
- We've also changed the way of calling operators. So the following
code:
<:table< table (
date timestamp NOT NULL DEFAULT(current_timestamp)
) >>
should have to change to something like:
<:table< table (
date timestamp NOT NULL DEFAULT(localtimestamp ())
) >>
(The first change is about the name and the second about the
argument added)
Full details:
0.7.1:
- Works with PGOCaml >= 2.0. int32_array is now mapped to int32
option array
instead of int32 array
0.7:
- Switch to OASIS
- Add support for UNION, INTERSECT, EXCEPT and their UNION ALL variant
- Add short types: nullable_data and non_nullable_data
- Add support for SQL function/operators: md5, IN
- Support unary operators (BREAKING CHANGE)
- Current_timestamp now using timestamptz + adding localtimestamp
for timestamp
reply other threads:[~2014-10-09 22:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5437136C.3090102@gmail.com \
--to=jp.deplaix@gmail.com \
--cc=caml-list@inria.fr \
--cc=ocsigen@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox