METAMATCH
filterMETAMATCH
expose the filter.byselector
internals. It returns true if the input GTS metadata matches the given selector. Input can also be an encoder, or a list of GTS or encoders.
Standard selector: classname{labelOrAttribute=x}
- If classname match,
filter.byselector
looks into input labels to check if labelOrAttribute exists and equals x. If labelOrAttribute is not found among input labels, it looks into input attributes if the label exists and equals x.
Extended selector: classname{labelname=x}{attributename=y}
matches if:
- classname matches
- input have labelname in its labels, and label value matches
- input have attributename in its labels, and attribute value matches
Selectors example:
~.*{}
matches everything.={}
matches only emtpy classnames, whatever the labels and attributes.~.*{label=value}{} filter.byselector
is equivalent to{ 'label' 'value' } filter.bylabels
.~.*{}{attribute~value} filter.byselector
is equivalent to{ 'attribute' '~value' } filter.byattr
.