Skip to content

Commit

Permalink
[+] Mnesia tables
Browse files Browse the repository at this point in the history
  • Loading branch information
hairyhum committed Aug 7, 2012
1 parent c09ecf4 commit fa5222e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
20 changes: 13 additions & 7 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
%% vim: ft=erlang

{sub_dirs, [
"libs/jiffy",
"libs/epgsql"

]}.

{lib_dirs, ["/usr/local/lib", "/usr/lib"]}.
{lib_dirs, []}.

% == EUnit ==
%% Options for eunit:test()
Expand All @@ -21,3 +15,15 @@
%% Whether to print coverage report to console. Default is `false'
{cover_print_enable, false}.

%% == Dependencies ==

%% Where to put any downloaded dependencies. Default is "deps"
{deps_dir, "deps"}.

%% What dependencies we have, dependencies can be of 3 forms, an application
%% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
%% an application name, a version and the SCM details on how to fetch it (SCM
%% type, location and revision). Rebar currently supports git, hg, bzr and svn.
{deps, [{'yaws', ".*", {git, "git://github.com/klacke/yaws.git", {branch, "master"}}},
{etest, ".*", {git, "git://github.com/wooga/etest.git"}},
mnesia]}.
4 changes: 4 additions & 0 deletions src/field.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-module(field).

-export([get/1,set/1]).

5 changes: 5 additions & 0 deletions src/tables.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-module(tables).
-include_lib ("amnesia_core/include/amnesia_db_def.hrl").

-export([]).

6 changes: 6 additions & 0 deletions src/tables.hrl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-record(device, {login, token}).
-record(user, {login, pin, email, role}).

-record(entity, {entity_id, name, value}).
-record(clock, {field_spec, token, clock}).

0 comments on commit fa5222e

Please sign in to comment.