-
Notifications
You must be signed in to change notification settings - Fork 26
Get Keys
Luke Bakken edited this page Oct 5, 2016
·
2 revisions
Javascript Source File on GitHub
These functions return bucket and key pairs for use in subsequent map or reduce jobs. Either of these functions can be used in conjunction with the reduce function in Delete Keys to delete keys returned by these functions.
The Erlang module:
-module(map_functions).
-export([get_keys/3]).
%Returns bucket and key pairs from a map phase
get_keys(Value,_Keydata,_Arg) ->
[[riak_object:bucket(Value),riak_object:key(Value)]].
The Javascript function:
function get_keys(object, keyData, arg) {
return [[object.bucket, object.key]]
}