F = fun() -> qlc:e(qlc:q([X || X <- mnesia:table(user)])) end,
mnesia:activity(transaction, F, [], mnesia_frag).
按条件查询:
mnesia:activity(transaction, fun() -> qlc:e(qlc:q([R || R <- mnesia:table(user), R#user.id == UserId ])) end).
posted on 2009-08-19 21:54 废铁 阅读(375) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 废铁 Powered by .NET 8.0 on Kubernetes