Erlang Mailing Lists

Author Message

<  Erlang questions mailing list  ~  Beginner problem with Mnemosyne

luke at javagroup.org
Posted: Fri Apr 09, 1999 2:13 am Reply with quote
Guest
Hi all,

I've just started playing with Mnesia, but I'm having a small problem
with some code based on the provided examples. On the function:

get_me() ->
Q = query [E.name || E <- table(employee),
E.sex = male] end,
F = fun() ->
mnemosyne:eval(Q) end,
mnesia:transaction(F).

During compilation I get the error message:
mnemosyne query, missing transformation

Could someone please point me in the right direction? (Complete
problem code attached).



Post generated using Mail2Forum (http://m2f.sourceforge.net)
tobbe at serc.rmit.edu.au
Posted: Fri Apr 09, 1999 2:44 am Reply with quote
Guest
> I've just started playing with Mnesia, but I'm having a small problem
> with some code based on the provided examples. On the function:

You must insert the following include directive (put it where
your other '-include'-directives are) in your company.erl program.

-include_lib("mnemosyne/include/mnemosyne.hrl").

Then it works:
-----------------------------------------------------
unix> erl -mnesia_dir `pwd`
Erlang (BEAM) emulator version 47.4.1

Eshell V47.4.1 (abort with ^G)
1> mnesia:create_schema([node()]).
ok
2> mnesia:start().
ok
3> c(company).
{ok,company}
4> company:init().
{atomic,ok}
5> company:insert_me().
{atomic,ok}
6> company:get_me().
{atomic,[luke]}
7>
-----------------------------------------------------

Cheers /Tobbe



Post generated using Mail2Forum (http://m2f.sourceforge.net)

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum