ordered_bag mnesia tables
Chandru
chandrashekhar.mullaparthi@REDACTED
Fri Dec 3 12:10:11 CET 2010
Hello OTP team,
Would it possible to have a new type of mnesia table called
'time_ordered_set'. So the important properties of such a table would
be:
* Records are always appended to the table (which means when I
traverse the table using the many mnesia functions available, the
ordering is predictable)
* When inserting a record with a key which already exists, the old
record is removed before inserting the new record (atomically even for
dirty writes)
I know this can be achieved using a unique value such as now() for the
primary key, but then duplicate management becomes extra work as
secondary indices have to be used, and a lookup using the secondary
key has to be done before every insert etc.
cheers
Chandru
More information about the erlang-questions
mailing list