[Opa] documentation for database functions
N Owen Gunden
ogunden at phauna.org
Wed Jan 18 18:41:57 UTC 2012
On Wed, Jan 18, 2012 at 11:24:47AM +0100, Matthieu Guffroy wrote:
> To return on your first question, (you were asking about how to know if
> a key is existing).
> There is a function Db.exists who take a path as parameters and return
> a boolean.
> A path is something like this : @/my/path[my_key] (but could also be
Thanks. I saw Db.exists but did not realize that it would work with a
path which indexes into the intmap like that. Cool!
> Indeed you could also use the optional get ?/my/path[my_key]
> but if your goal is not to read the data just checking if exists, if
> thinks it's less good.
This turns out to be exactly what I was looking for, I just didn't
know it existed. I don't see it on the "database" page of the manual.
Is it documented somewhere?
More information about the Opa