Created
April 16, 2016 10:21
-
-
Save krakatoa/61e423dbf01f247c6302c9fe9cb70512 to your computer and use it in GitHub Desktop.
mnesia-transform.ex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex(15)> trans = fn(backup) -> | |
...(15)> IO.puts "backup: #{inspect backup}" | |
...(15)> backup | |
...(15)> end | |
#Function<6.50752066/1 in :erl_eval.expr/5> | |
iex(16)> :mnesia.transform_table(:endpoints, trans, [:idx, :host, :port, :transport]) | |
backup: {:endpoint, 1, 'localhost', 5555, 'tcp'} | |
{:atomic, :ok} | |
iex(17)> :mnesia.transform_table(:endpoints, trans, [:idx, :host, :port, :transport]) | |
backup: {:endpoint, 1, 'localhost', 5555, 'tcp'} | |
{:atomic, :ok} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment