Skip to content

Commit

Permalink
Fix storage select callback function definition of -> tuple() to [tup…
Browse files Browse the repository at this point in the history
…le()]
  • Loading branch information
sargun committed May 23, 2016
1 parent beab576 commit bc56756
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/erldns_storage.erl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ backup_tables() ->
Module:backup_tables().

%% @doc Call to a module's select. Uses table key pair, and can be considered a "lookup" in terms of ets.
-spec select(atom(), term()) -> tuple().
-spec select(atom(), term()) -> [tuple()].
select(Table, Key) ->
Module = mod(Table),
Module:select(Table, Key).
Expand Down
2 changes: 1 addition & 1 deletion src/erldns_storage_json.erl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ backup_tables() ->
{error, not_implemented}.

%% @doc Select from ets using key, value.
-spec select(atom(), term()) -> tuple().
-spec select(atom(), term()) -> [tuple()].
select(Table, Key) ->
ets:lookup(Table, Key).

Expand Down
2 changes: 1 addition & 1 deletion src/erldns_storage_mnesia.erl
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ backup_tables()->
{error, not_implemented}.

%% @doc Select based on key value.
-spec select(Table :: atom(), Key :: term()) -> tuple().
-spec select(Table :: atom(), Key :: term()) -> [tuple()].
select(Table, Key)->
Select = fun () ->
case mnesia:read({Table, Key}) of
Expand Down

0 comments on commit bc56756

Please sign in to comment.