[erlang-questions] Issue in searching element in mnesia table
shiva
gattushivakrishna@REDACTED
Fri Apr 6 14:47:08 CEST 2018
Hi all,
I have requirement of storing list of tuple of elements in record
fields of a table in mnesia.
This is the record defined for the table,
record( test_info, { test_id:: integer(), username::atom(),
test_details::list(), dut_card_details::list(),
ats_card_details::list(), test_result::list()}).
example:
This is the 'test_info' table with data,
{test_info,3,kavi123,
["#102","09:45","11:55",pass],
[ommp82_plus,12775,'1_4_3','0.1','0.0.1',123458889],
[ats_card,12790,'1_7_5','1.1','0.1.1',123775777],
[{port1,{sfp,185,wqc,*wxt193*,1905,80,no,pass,pass,pass,pass,pass,
pass,pass,pass,pass}},
{port2,{sfp,174,was,zte142,1960,80,no,pass,pass,pass,pass,pass,
pass,pass,pass,pass}},
{port3,{sfp,189,wsc,svz77,2306,80,no,pass,pass,pass,pass,pass,
pass,pass,pass,pass}},
{port4,{xfp,134,was,xtg142,2560,80,no,fail,pass,pass,pass,fail,
pass,pass,pass,pass}}]}
i have an issue, how to search a record, which contains specific element
from the list of tuple from mnesia table?
example:
i need list of all the records containing 'wxt193' element in it.
Can you please suggest if any solution to resolve my issue,
Regards,
Gattu ShivaKrishna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180406/86d2cc0c/attachment.htm>
More information about the erlang-questions
mailing list