Produce a match specification for select(), supporting map-based match patterns
Using record syntax in match patterns tends to conflict with type checking. This
function offers an alternative approach, drawing on the fact that mnesia_rocksdb
keeps the record name and attribute names readily available as persistent terms.
When using the map-based representation, the match pattern is built by matching
attribute names to map elements; any attribute not found in the map gets set to '_'.
Thus, [{#balance{key = {Acct,'$1'},_='_'},[{'>=','$1',Height}],['$_']}] can be
created as ms(balance,[{#{key => {Acct,'$1'}},[{'>=','$1',Height}],['$_']}]).
This has the advantage over ms_transform that it can handle bound variables
in the match pattern. The function works on all mnesia table types.
From the doc:
> Produce a match specification for `select()`, supporting map-based match patterns
>
> Using record syntax in match patterns tends to conflict with type checking. This
> function offers an alternative approach, drawing on the fact that mnesia_rocksdb
> keeps the record name and attribute names readily available as persistent terms.
>
> When using the map-based representation, the match pattern is built by matching
> attribute names to map elements; any attribute not found in the map gets set to `'_'`.
> Thus, `[{#balance{key = {Acct,'$1'},_='_'},[{'>=','$1',Height}],['$_']}]` can be
> created as `ms(balance,[{#{key => {Acct,'$1'}},[{'>=','$1',Height}],['$_']}])`.
>
> This has the advantage over `ms_transform` that it can handle bound variables
> in the match pattern. The function works on all mnesia table types.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
From the doc:
Not generating new
edownyet, as some incompatibility seems to have snuck in betweenedownand lateredocversions.