April 2018
Beginner to intermediate
406 pages
9h 33m
English
Let's begin by messing around a little bit with ETS inside of an IEx window. We can go to our application directory and run a new IEx session with iex -S mix:
$ iex -S mixErlang/OTP 20 [erts-9.1.5] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]Interactive Elixir (1.5.2) - press Ctrl+C to exit (type h() ENTER for help)iex(1)>
We'll start this off simply enough. We'll create a table that can store a little bit of information in a set. Again, we can store any data structure that Elixir can understand, so this can actually be really handy! We can create a table with the :ets.new(table_name, [:type])command . This will return a table reference to us that we ...