PageRenderTime 186ms CodeModel.GetById 100ms app.highlight 8ms RepoModel.GetById 73ms app.codeStats 0ms

/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
 1-module('db').
 2
 3-export([get/2]).
 4-include("uce.hrl").
 5
 6get(Module, Domain) ->
 7    ?COUNTER(lists:flatten(io_lib:format("db:get:~s", [Module]))),
 8    case config:get(Domain, db) of
 9        undefined -> throw({error, no_database});
10        _ = Value -> list_to_atom(lists:concat([Module, "_", Value]))
11    end.