Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Allow mem3_shards:local to take a list or binary
BugzId: 29571
  • Loading branch information
chewbranca authored and rnewson committed Jul 23, 2014
1 parent 8665201 commit 7044f6c543ac6bbdbe0f4bb3f9b7a5d2ec0f206a
Showing 1 changed file with 2 additions and 0 deletions.
@@ -107,6 +107,8 @@ get(DbName, Node, Range) ->
[_|_] -> {error, duplicates}
end.

local(DbName) when is_list(DbName) ->
local(list_to_binary(DbName));
local(DbName) ->
Pred = fun(#shard{node=Node}) when Node == node() -> true; (_) -> false end,
lists:filter(Pred, for_db(DbName)).

0 comments on commit 7044f6c

Please sign in to comment.