Tue Oct 30 17:24:27 CET 2001
> I was wondering if there exists any documentation on
> Mnemosyne apart from
> the section in the Application overview.
> I would like to do a query of a table but only pull out one
> record of any
> particular type from a table in which there could exist many
> items of each type.
> Does anyone know how to formulate this query?
Mnemosyne has a very elegant syntax but is hopelessly inefficient unless you
specify lookup on an indexed field (otherwise it pulls out the whole table
into a big list and searches through..). It also relies on the underlying
capabilities in mnesia so if mnesia can't do it then mnemosyne can't.
In R8B ets you can specify the number of rows which are returned from a
match or select call so you could do a match on each record type in turn
with ets:match(Tab, Pattern Max_rows) where Max_rows is set to 1.
Unfortunately mnesia doesn't support this addition to ets but I dare say
that might follow sometime. Meanwhile you can do ets operations directly on
local mnesia tables so long as you don't want any transaction safety.
Apart from all that I can't think of a way to do it in mnemosyne :-)
NOTICE AND DISCLAIMER:
This email (including attachments) is confidential. If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents. We cannot accept liability for any breaches of
confidence arising through use of email. Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions. We will not accept responsibility for any commitments
made by our employees outside the scope of our business. We do not warrant
the accuracy or completeness of such information.
More information about the erlang-questions