Hello,
I have this mnesia query:
get_note(ID) ->
Query =
fun() ->
mnesia:read({?TABLE, ID})
end,
{atomic, Results} = mnesia:transaction(Query),
Results.
It returns either a list containing one or more valid records or an empty list.
Would it be better to return something like:
{ok, Records} | {error, data_not_found}
Thanks,
LRP