Skip to content

Instantly share code, notes, and snippets.

@seancribbs
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seancribbs/840828b715d26b0e865a to your computer and use it in GitHub Desktop.
Save seancribbs/840828b715d26b0e865a to your computer and use it in GitHub Desktop.
-module(crdt_mapred).
-compile(export_all).
%% @doc Map phase function for returning CRDT set values as lists of lists
map_set_value(RiakObject, _, _) ->
[riak_kv_crdt:set_value(RiakObject)].
%% @doc Map phase function for returning CRDT set values wrapped in JSON-like objects
map_set_value_json(RiakObject, _, _) ->
[{struct, [{set, riak_kv_crdt:set_value(RiakObject)}]}].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment