[erlang-questions] Get a range of tuples from a Mnesia table
Tue Oct 7 17:54:40 CEST 2008
RIght. He did say he was using an ordered_set, and I was imprecise in saying
that it returned the record rather than a one-element list containing the
record. Poetic license :)
On Tue, Oct 7, 2008 at 4:28 AM, Mats Cronqvist <>wrote:
> Edwin Fine wrote:
>> Looking through the docs, I see that if you are using an mnesia table that
>> is ram_copies or disc_copies, you can do certain fast operations on the
>> associated ets table. One such operation (which is recommended only for
>> debugging, but what the heck) is ets:slot(Tab, I), which returns the I'th
>> record in the table.
> slot/2 does not in general return the I:th record.
> it does return a one-element list of the I:th record, iff the table is of
> type ordered_set. for other table types, it returns a list of all records in
> the I:th slot, i.e. all objects whose keys hash to the same value.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions