Generating unique ids in Mnesia
Joel Reymont
joelr1@REDACTED
Thu Aug 18 16:40:33 CEST 2005
Folks,
I need to maintain a table of players in Mnesia and I would like to
assign players a unique id when they are added. Right now I generate
a tuple of {timestamp hash, pid hash} and then hash that once more to
get a unique id.
Is there an easier way to do this in Mnesia? The ids can be
sequential or random, they just can't repeat themselves as the table
is a set. I guess I'm looking for something like a max aggregator on
a Mnesia column.
Thanks, Joel
More information about the erlang-questions
mailing list