<div dir="ltr">Direct map support in ets, dets, and mnesia would indeed be nice. I am currently using a number of mnesia tables to pack maps into tuples with the key copied into the first tuple spot:<div><br></div><div><br>
</div><div><span style="font-family:'courier new',monospace">#{key => 123, value1 => abc, value2 => 3.14, ...}</span><br></div><div><span style="font-family:'courier new',monospace"><br></span></div>
<div><font face="arial, helvetica, sans-serif">... becomes...</font></div><div><span style="font-family:'courier new',monospace"><br></span></div><div><font face="courier new, monospace">{123, #{key => 123, value1 => abc, value2 => 3.14, ...}}</font></div>
<div><br></div><div>Dan.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 10, 2014 at 11:31 PM, Max Lapshin <span dir="ltr"><<a href="mailto:max.lapshin@gmail.com" target="_blank">max.lapshin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">I'm asking exactly about</div><div class="gmail_extra"><br></div><div class="gmail_extra">
<span style="font-family:arial,sans-serif;font-size:13px"> ets:insert(web_sessions, #{session_id => <<"1234">>,bytes => 0}).</span><br>
</div><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:13px">ets:update_counter(web_sessions, <<"1234">>, {bytes, 150})</span></div>
<div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>