Mnesia, match specs, and partial row updates

mnesia (and ETS) APIs kept backwards compatibility with very old OTP versions (before maps were supported in ERTS).
I wonder if there are alternatives, or alternative APIs being developed. For example, a better match spec. Consider this example, select all rows where column kind is equal to own

mnesia:select(table, #{kind => own})

Or updating specific fields:

mnesia:write(table, #{id => 123, kind => cumulative})
3 Likes
mnesia:create_table(foo, []).
mnesia:write({foo, #{bar => 42}).
Spec = [{foo, #{bar => 42}}, [], ['$_']}],
mnesia:select(foo, Spec).
1 Like

@max-au that’s not possible, it good idea but all we have now is Match specs, but it’s fine and each time I can’t find the appropriate syntax for my request I use a little script using ets:fun2ms to generate the request in question.