Skip to content

Instantly share code, notes, and snippets.

@voluntas
Created September 19, 2011 18:44
Show Gist options
  • Save voluntas/1227236 to your computer and use it in GitHub Desktop.
Save voluntas/1227236 to your computer and use it in GitHub Desktop.
erjang 使ってみた
% java -jar erjang-0.1-otp-R14B02.jar
Eshell V5.7.5 (abort with ^G)
1> erlang:now().
{1316,457614,333466}
2> os:timestamp().
{1316,457619,725469}
3> mnesia:start().
ok
4> rd(store, {key, value}).
store
5> mnesia:create_table(table, [{record_name, store}, {attributes, record_info(fields, store)}]).
{atomic,ok}
6> mnesia:dirty_write(table, #store{key = 1, value = 2}).
ok
7> mnesia:dirty_read(table, 1).
[#store{key = 1,value = 2}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment