time_ordered_set mnesia table (was: ordered_bag mnesia tables)
Fri Dec 3 12:18:56 CET 2010
Sorry, I posted earlier with the wrong subject.
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
* 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
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.
More information about the erlang-questions