I am trying to build a match spec on a DETS table and I've ran into something that puzzles me.
The Structure of the table entries look as follows:
{'RECORD_KEY','BODY_TUPLE'}
the 'RECORD_KEY' term looks like this {shell,T1,T2,T3,T4,T5,T6}
If I match spec on this:
{{' _','_','$1','_','_','_'},'$2'}
ie: dets:match(Ref, {{'_','_','$1','_','_','_'},'$2'} )
I get all entries in the table. However, now I try to add some other terms to the match spec so I can start adding guards like this:
Terms = {{' _','_','$1','_','_','_'},'$2'},
Gaurds = [],
Returns = ['$1'],
Pattern = [{Terms,Gaurds,Returns}],
Matches = dets:match(Ref, Terms),
which returns NO entries, even if I replace the '$1' with '$_'.
What am I doing wrong here?