/ucengine/src/models/db.erl
http://github.com/AF83/ucengine · Erlang · 11 lines · 9 code · 2 blank · 0 comment · 0 complexity · ec9c7b49f8526ca52959edd6fc80559c MD5 · raw file
- -module('db').
- -export([get/2]).
- -include("uce.hrl").
- get(Module, Domain) ->
- ?COUNTER(lists:flatten(io_lib:format("db:get:~s", [Module]))),
- case config:get(Domain, db) of
- undefined -> throw({error, no_database});
- _ = Value -> list_to_atom(lists:concat([Module, "_", Value]))
- end.