cabol / shards

Partitioned ETS tables for Erlang and Elixir

Home Page:https://hexdocs.pm/shards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing support for keypos

edescourtis opened this issue · comments

For people using records in ets tables, it is essential to support setting the keypos.

@edescourtis could you please elaborate more on that, why do you say it is not supported? In what case keypos doesn't work or it is not supported by shards, and it is supported normally by ets? I need more details, please.

When using records (tagged tuples) it is always the case that the key (used for lookups for example) is not stored at position 1 (typically the key would be at position 2). keypos is something mandatory to support records in ets.

It is of course supported by ets and doesn't work with shards otherwise I wouldn't have filed an issue.

You are also missing select_replace see my branch in case you want to cherry-pick it.

Ok, I'll check it out, thanks!

I found the issue with keypos, I'll try to fix it as soon as I can, thanks again!

No thank you for making this library! I will definitely use it in the future.

Fixed on the master branch! Please try it out and let me know how it goes and if we can close the issue. For select_replace I will create another one.

I will close the issue, feel free to open it in case it doesn't work or you find something wrong with it.