Change not reflected when using ets:update_counter

Emil Hellman emil.hellman@REDACTED
Sun Oct 16 00:32:28 CEST 2005


> Thanks for the info. However, the ets:update_counter function allows me
> to specify a position which needs to be updated with an increment. The
> mnesia:update_counter function does not seem to have this facility.

The dets module provides disk based term storage. It works as ets
tables, but writes stuff to files instead. So check it out :)

> Is there any way I can specify the position to update ? What is my_table
> has two integer fields, and I want to update different fields in
> different situations ?
> Anindya.
>
>

>From what I gather the dets:update_counter function takes 3
arguments.Key, Name and Increment. Increment is either an integer (and
the function then updates the element directly after the key) or a
tuple with {Pos, Incr} where Pos is the postition you want to update
and Incr the amount you want to increment the counter with. Hope that
helps...



More information about the erlang-questions mailing list