Variable variables within an mnemosyne query
Dale Harvey
harveyd@REDACTED
Mon Nov 7 02:10:22 CET 2005
I want to be able to define dynamic field / clause lists to be entered into
a query and cant
seem to get it down, example :
Entity = atable,
FieldList = "S.name <http://S.name>,S.address",
ClauseList = "S.name <http://S.name> = \"me\" ",
Q = query [ FieldList || S <- table(Entity), ClauseList ] end,
Field/Clause lists have to be string, otherwise it will start looking for
the bound variable
so I need a way of having the string evaluated within the query so the query
would evaluate as
Q = query [ S.name <http://S.name>,S.address || S <- table(atable),
S.name<http://S.name>= "me" ] end,
in other langages I have eval to do this, or $$ in php, but I cant seem to
find a way of doing this
in erlang
Thanks in advance
Dale
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20051107/9134acc6/attachment.htm>
More information about the erlang-questions
mailing list