dirty mnesia function
Tue Sep 24 01:03:59 CEST 2002
you are running your match_object function from the shell. That means
that the shell will format the result for you as it sees fit. Thus, as
is happening in your second example, if there are many records, instead
of printing them all out, it prints out the leading elements and
replaces all the others with |...
Try binding your result to a variable and print it out. For example
> RecordList = mnesia:dirty_match_object(piuTable,
Because you are using the tuple representation or records, I am assuming
your retrieving the list of records from the shell is for pure test
reasons. In that case, as mnesia tables are built on ets tables, you can
> RecordList = ets:tab2list(piuTable).
You have to still assign it to a variable and print it out using
io:format, but avoiding the underscores, are not using the tuple
representation of records, with less chances of making mistakes.
Good Luck (More like good night over here :-),
Roberto Portugal (CEC) wrote:
> We are trying to get all records from a mnesia's table.
> "dirty_match_object" function is used to this purpose:
> However some records are not valid when content is returned.
> The following is a valid record returned:
> But in the next case, record information is not valid:
> some fields are replaced with "|...".
> How we can to get all records in a rigth form througth this function?
> Thanks in advanced.
> Roberto Portugal
> System Integrator
> Regional Competence Center
> Ericsson Chile, S.A.
> Av. Vitacura 2808, Las Condes, Santiago, Chile
> Telf.: +56 2 372 53 95
> Fax: +56 2 372 50 57
More information about the erlang-questions