-
-
Save z5ottu/875750bda2a151958fe3de2a089f9de5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
% Update Counter | |
increment | |
decrement | |
{increment, 4} | |
{decrement, 9} | |
% Update Set | |
{add, <<"Value">>} | |
{add_all, [<<"Value">>]} | |
{remove, <<"Value">>} | |
{remove_all, <<"Value">>} | |
% Update Map | |
% Update Embedded Set | |
[{update, {<<"FieldName">>, riak_dt_orswot}, {add, <<"Value">>}}] | |
% Update Embedded Counter | |
[{update, {<<"FieldName">>, riak_dt_emcntr}, {increment, 1}}] | |
% Update Embedded Flag | |
[{update, {<<"FieldName">>, riak_dt_od_flag}, enable}] | |
% Update Embedded Register | |
[{update, {<<"FieldName">>, riak_dt_orswot}, {assign, <<"Val">>}] | |
% In a Map you can combine the updates | |
[ | |
{update, {<<"Field1">>, riak_dt_od_flag}, disable}, | |
{update, {<<"Field2">>, riak_dt_orswot}, {assign, <<"Val">>} | |
] | |
% The above operations should be put into an update statement: | |
{update, Operation} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment