summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2017-11-19 19:05:06 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2017-11-19 19:05:06 +0100 |
commit | c3c8f24ebde2370d8314b1f0e571a26fbcff9450 (patch) | |
tree | d3bcb696d7e10bb6b1b1641945eccde32ea8b08b /src/database_shim.erl | |
parent | 55d3257033e7ca3818425e280bdee9aa6f24fbcb (diff) |
Fixes typos.
Diffstat (limited to 'src/database_shim.erl')
-rw-r--r-- | src/database_shim.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/database_shim.erl b/src/database_shim.erl index 4110918..8b6cea4 100644 --- a/src/database_shim.erl +++ b/src/database_shim.erl @@ -23,10 +23,12 @@ create_db (_Heir) -> {keypos, 1}, {read_concurrency, true} ] - ). + ), + io:format("~ndb_shim ets created.~n"). add_to_db (ID, Val) -> - ets:store(db_shim, {ID, Val}). + io:format("~nadd to db_shim: ~p.~n", [{ID, Val}]), + ets:insert(db_shim, {ID, Val}). generate_char_instances (Battlemap, Characters) -> lists:map @@ -72,7 +74,7 @@ generate_db (Heir) -> lists:map ( fun (Char) -> - add_to_db({character_sb, Char#character.id}, Char) + add_to_db({character_db, Char#character.id}, Char) end, Characters ), @@ -83,7 +85,7 @@ generate_db (Heir) -> ). fetch (DB, Object_ID) -> - ets:first(db_shim), %% It appears the db does not exist... + io:format("~ndb_shim lookup: ~p.~n", [{DB, Object_ID}]), case ets:lookup(db_shim, {DB, Object_ID}) of [{_Key, Value}] -> {ok, Value}; [] -> nothing |