mnemosyne:string_to_handle pb !

Lecomte Jean François <>
Wed Dec 13 12:00:46 CET 2000


Hi, 

I do need to build a handle query using a string but when i tried to
use the mnemosyne string_to_handle it fails !

Following code

    Q =  mnemosyne:string_to_handle( "query [ X || X <- table ( jabber_personne ), X.age=22 ] end. "),
    mnesia:transaction(fun() -> mnemosyne:eval(Q) end).

gives 

{aborted,{function_clause,[{mnemosyne,setup_query,
                                      [{'EXIT',
                                           {function_clause,
                                               [{erl_parse,
                                                    normalise,
                                                    [{call,
                                                         0,
                                                         {atom,
                                                             0|...},
                                                         [{tuple|...}]}]},
                                                {erl_parse,normalise_list,1},
                                                {erl_parse,normalise,1},
                                                {erl_parse,normalise_list,1},
                                                {erl_parse,normalise,1},
                                                {mnemosyne_lc,
                                                    '-one_lc_to_handle/1-fun-1-',
                                                    2},
                                                {lists,foldl,3},
                                                {mnemosyne_lc,
                                                    one_lc_to_handle,
                                                    1}|
                                                more]}}]},
                           {mnemosyne,cursor,2},
                           {mnemosyne,eval,1},
                           {mnesia_tm,apply_fun,2},
                           {mnesia_tm,execute_transaction,4},
                           {erl_eval,expr,3},
                           {erl_eval,exprs,4},
                           {shell,eval_loop,2}]}}



but :
    query [ X || X <- table ( jabber_personne ), X.age=22 ] end,
    mnesia:transaction(fun() -> mnemosyne:eval(Q) end).

works fine !

Any idea

-- 
-- 
J-François LECOMTE                      IDEALX S.A.S.




More information about the erlang-questions mailing list