[erlang-questions] Mnesia docs question

Kirill Zaborski qrilka@REDACTED
Thu Jun 14 09:19:25 CEST 2007


Reading docs for mnesia I see
  read({Tab, Key}) -> transaction abort | RecordList

And in User docs I see an example:
  [E] = mnesia:read(employee, Eno, write)

But when I run (x is some existing example table):
  mnesia:transaction( fun()-> [X] = mnesia:read({x, 1}) end).

I get
  {aborted,{{badmatch,[#x{a = 1,b = 1}]},[{erl_eval,expr,3}]}}

It looks like read/2 returns {atomic, RecordList} and not just RecordList.
Was their some such change in mnesia API and there is a bug in
documentation and I should post it to erlang-bugs?

Regards,
Kirill.



More information about the erlang-questions mailing list