Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有记忆表:
-record(counter, { value, type, tree }).
如何从这 3 个字段中获取所有数据?
谢谢你。
你只想要一个表中的所有数据?在我的头顶上:
mnesia:transaction(fun()-> qlc:e(mnesia:table(counter)) end).
同样的事情,但更有效:
mnesia:async_dirty(fun()-> qlc:e(mnesia:table(counter)) end).
此外,更快: mnesia:dirty_match_object(#counter{_ = '_'}).
mnesia:dirty_match_object(#counter{_ = '_'}).