{"id":28233067,"url":"https://github.com/mendrugory/ets_helper","last_synced_at":"2025-06-14T21:30:58.523Z","repository":{"id":57497784,"uuid":"103910922","full_name":"mendrugory/ets_helper","owner":"mendrugory","description":"ETS Wrapper to help in your Elixir projects","archived":false,"fork":false,"pushed_at":"2017-09-18T10:50:47.000Z","size":93,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-18T20:11:20.142Z","etag":null,"topics":["cache","elixir-lang","ets"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mendrugory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-18T08:07:33.000Z","updated_at":"2018-01-09T12:45:09.000Z","dependencies_parsed_at":"2022-08-28T17:13:08.252Z","dependency_job_id":null,"html_url":"https://github.com/mendrugory/ets_helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mendrugory/ets_helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendrugory%2Fets_helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendrugory%2Fets_helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendrugory%2Fets_helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendrugory%2Fets_helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mendrugory","download_url":"https://codeload.github.com/mendrugory/ets_helper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendrugory%2Fets_helper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259887212,"owners_count":22926877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","elixir-lang","ets"],"created_at":"2025-05-18T20:10:32.179Z","updated_at":"2025-06-14T21:30:58.515Z","avatar_url":"https://github.com/mendrugory.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EtsHelper\n\n[![hex.pm](https://img.shields.io/hexpm/v/ets_helper.svg?style=flat-square)](https://hex.pm/packages/ets_helper) [![hexdocs.pm](https://img.shields.io/badge/docs-latest-green.svg?style=flat-square)](https://hexdocs.pm/ets_helper/) [![Build Status](https://travis-ci.org/mendrugory/ets_helper.svg?branch=master)](https://travis-ci.org/mendrugory/ets_helper)\n\n `EtsHelper` is a wrapper of [ETS](http://erlang.org/doc/man/ets.html). It does not try to wrap all the\n functionality, only those functions that are constantly used in Elixir projects. It also includes some\n new functions. This is a library that could be improved in the future if it is required by new needs.\n\n## Installation\n  Add `ets_helper` to your list of dependencies in `mix.exs`:\n\n  ```elixir\n  def deps do\n    [{:ets_helper, \"~\u003e 0.1.0\"}]\n  end\n  ```\n    \n\n## How to use it\n  \n  * New table\n  ```bash\n  iex\u003e EtsHelper.init_table(:my_table)\n  ```\n\n  * New table with options\n  ```bash\n  iex\u003e EtsHelper.init_table(:my_table, [:named_table, :public, {:read_concurrency, true}, {:write_concurrency, true}])\n  ```  \n  \n  * Insert data\n  ```bash\n  iex\u003e EtsHelper.insert(:my_table, {\"key\", \"data\"})\n  iex\u003e EtsHelper.insert(:my_table, {:key, :data})\n  iex\u003e EtsHelper.insert(:my_table, {{:key, 2}, {1, 2, 3}})\n  ```  \n\n  * Get data\n  ```bash\n  iex\u003e EtsHelper.get(:my_table, \"key\")\n  ``` \n\n  * Get all data\n  ```bash\n  iex\u003e EtsHelper.all(:my_table)\n  ```   \n  * Get all keys\n  ```bash\n  iex\u003e EtsHelper.keys(:my_table)\n  ```   \n\n  * Delete data\n  ```bash\n  iex\u003e EtsHelper.delete(:my_table, \"key\")\n  ```   \n\n  * Delete all data\n  ```bash\n  iex\u003e EtsHelper.delete_all(:my_table)\n  ```\n\n  * Delete all registers whose data matches with the given function\n  ```bash\n  iex\u003e # Delete odd data\n  iex\u003e EtsHelper.delete_data_with(:my_table, fn x -\u003e rem(x, 2) != 0 end)\n  ```\n\n  * Get data according to given pattern\n  ```bash\n  iex\u003e EtsHelper.insert(table_name, [{:brunte, :horse, 5}, {:ludde, :dog, 5}, {:rufsen, :dog, 7}])\n  iex\u003e EtsHelper.match(table_name, {:\"_\", :dog, :\"$1\"})\n  ```  \n\n  * Table Information\n  ```bash\n  iex\u003e EtsHelper.info(:my_table)\n  ```  \n\n## Test\n  Run the tests.\n  ```bash\n  $\u003e mix test \n  ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmendrugory%2Fets_helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmendrugory%2Fets_helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmendrugory%2Fets_helper/lists"}