[erlang-questions] How do you transform a record properly?
Wed Mar 25 15:26:40 CET 2009
I don't think mnesia minds, because it treats the table name differently
from the record name used to access it. I just added a new field using
the example from here:
In my own example, the table name and original record name was
"rate_dest". The new record name was "rate_dest_new" which was identical
apart from one extra field. After running the transform, I just added
the new field to record rate_dest and deleted the definition of
Bengt Kleberg wrote:
> You are doing it the right way.
> Unless you change the name of the tuple when you change the contents.
> But that would perhaps be a problem for mnesia.
> On Mon, 2009-03-23 at 20:18 -0700, ryeguy wrote:
>> How would you add a field to a table using mnesia:table_transform? I
>> got it to work by just using a raw tuple in the function header, but
>> how do you match the old record, then output the new record with just
>> the new field added/changed?
>> erlang-questions mailing list
> erlang-questions mailing list
Savage Minds Ltd
+44 20 79210521
More information about the erlang-questions