Strings (was: Re: are Mnesia tables immutable?)

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Wed Jun 28 13:39:27 CEST 2006


 
Thomas Lindgren wrote:
> 
> Persistent data (e.g., mnesia) will also need to play nice 
> with different encodings. 
> 
> I'm not sure how generic databases handle this, but for dets, 
> perhaps one could (persistently) set the encoding for the 
> table. (Clients could then invoke the appropriate 
> term_to_binary and binary_to_term as part of insert/lookup/...)

This is one of the things I added to 'rdbms'. It allows you to specify
read/write filters to a table, where the filter is an extended match
specification. This makes 'rdbms' able to transparently coerce data
(within limits) to/from given representations. You can, for example,
specify a list_to_binary/binary_to_list coersion (binary_to_term also
works.)

Beta testing has gone pretty well, I think, and I will pretty soon make
a new version available. I'd love to have someone take a look at these
filters too, to see whether they are appropriate and add sufficient
value.

BR,
Ulf W



More information about the erlang-questions mailing list