Skip to Content
Phoenix Web Development
book

Phoenix Web Development

by Brandon Richey
April 2018
Beginner to intermediate content levelBeginner to intermediate
406 pages
9h 33m
English
Packt Publishing
Content preview from Phoenix Web Development

Experimenting with ETS in an IEx window

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Phoenix in Action

Phoenix in Action

Geoffrey Lessel
Real-Time Phoenix

Real-Time Phoenix

Stephen Bussey

Publisher Resources

ISBN: 9781787284197Supplemental Content