<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi everybody.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'd like to know if it is possible to include a
function call in the body of a Mnemosyne query. Knowing that a query is declared
as</FONT><FONT face=Arial size=2>: query [ <pattern> || <body> ]
end</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>The doubt comes to me when I tried to run this
example:</FONT></DIV>
<DIV><FONT face=Arial
size=2> Q = query
[{E.item, E.url} || E <- table(menus), <STRONG>element(1, E.item) </STRONG>=
Level] end,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>but a "{aborted,mnemosyne_not_running}" is all I've
obtained from the shell :o(</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Neither I could run my example in this
way:</FONT></DIV>
<DIV><FONT face=Arial size=2>...</FONT></DIV>
<DIV><FONT face=Arial size=2> Menus = #menus{item =
'$1'},</FONT></DIV>
<DIV><FONT face=Arial size=2> Guard =
{'==',<STRONG>'element(1, $1)'</STRONG>,Level},<BR>
mnesia:select(menus, [{Menus , [Guard], [['$1','$2']]}])</FONT></DIV>
<DIV><FONT face=Arial size=2>...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'd be happy if someone could tell me how to
execute a query by a partial key, when the key of a Mnesia table is a compound
key as {elem1, elem2, elem3} and I want to search only by elem1 for
example.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks a lot,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Ing. Carlos E. Silva</FONT></DIV>
<DIV><FONT face=Arial size=2>INSwitch Solutions</FONT><FONT face=Arial
size=2></DIV></FONT></BODY></HTML>