[erlang-patches] Add lists:find/2,3
Serge Aleynikov
serge@REDACTED
Wed Nov 13 15:18:02 CET 2013
Sorry, a couple of typos in my previous example:
> update_table(Table,
>
> Key,
>
> FieldName,
>
> Value) ->
> Attrs = mnesia:table_info(Table, attributes),
> {ok, Pos} = index_of(FieldName, Attrs),
> R = mnesia:dirty_read(Table, Key),
> R1 = setelement(Pos, R, Value),
> ok = mnesia:dirty_write(Table, R1).
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20131113/9a760430/attachment.htm>
More information about the erlang-patches
mailing list