-
-
Save macintux/1f34d0443fdf029161c6 to your computer and use it in GitHub Desktop.
Minimally-tested update to riakc_set.erl to allow sets created via `new/2` to be sent to Riak properly.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/riakc_set.erl | |
+++ b/src/riakc_set.erl | |
@@ -107,6 +107,8 @@ dirty_value(#set{value=V, adds=A, removes=R}) | |
%% @doc Extracts an operation from the set that can be encoded i | |
%% update request. | |
-spec to_op(riakc_set()) -> riakc_datatype:update(set_op()). | |
+to_op(#set{value=V, adds=A, removes=R, context=undefined}) -> | |
+ {type(), {add_all, (V++A)--R}, undefined}; | |
to_op(#set{adds=[], removes=[]}) -> | |
undefined; | |
to_op(#set{adds=A, removes=[], context=C}) -> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment