Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement record updates #6

Open
chouzar opened this issue Nov 27, 2024 · 0 comments
Open

Implement record updates #6

chouzar opened this issue Nov 27, 2024 · 0 comments

Comments

@chouzar
Copy link
Owner

chouzar commented Nov 27, 2024

There are quite a bit of caveats implementing updates, not sure if they are really needed when probably retrieving and re-inserting data would be easier. So only a feature if a good API can be figured out.

https://www.erlang.org/doc/apps/stdlib/ets.html#update_element/4

The function fails with reason badarg in the following situations:

  • The table type is not set or ordered_set.
  • The element to update is also the key.

https://www.erlang.org/doc/apps/stdlib/ets.html#select_replace/2

For the moment, due to performance and semantic constraints, tables of type bag
are not yet supported.

In cases the feature is not supported, maybe just implement a less efficient fallback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant