mnesia primary key creation

Bruce Fitzsimons Bruce@REDACTED
Fri Jun 30 05:55:29 CEST 2006


Roberto Saccon wrote:
> I am wondering whether experienced erlang developers have something
> better in their best-practises-treasure-box than what I have come up
> with to create mnesia primary keys:
I use a seperate app or sys table (used for storing random system config 
items) and use:

mnesia:dirty_update_counter(Tab, Key, Incr) -> NewVal | exit({aborted, 
Reason})

(which is atomic, despite the dirty name) with one key per table that 
requires keys. Works well.

Cheers,
Bruce



More information about the erlang-questions mailing list