ets:insert can be used to update data in an ets set, but how about a bag? Do we have to update by match_delete or select_delete first and then insert?
Asked
Active
Viewed 1,475 times
1 Answers
4
The concept of a bag doesn't make sense if updates are going to be required. Given that ets:update_element/3
explicitly doesn't support bags, it seems evident that delete then write is your only option.

macintux
- 894
- 4
- 6
-
Yep, seems that delete then insert is the only choice if I have to stick with bag. I'm thinking if using a set with the help of an extra index table is helpful in terms of performance, will try. – Ray Jan 28 '14 at 05:38