Riptide.Mutation.combine
You're seeing just the function
combine
, go back to Riptide.Mutation module for more information.
Specs
Takes a list or stream of Mutations and combines them in order to produce a single output mutation.
Examples
iex> 0..3
...> |> Stream.map(fn index ->
...> Riptide.Mutation.put_merge(["todo:info", to_string(index)], index)
...> end)
...> |> Riptide.Mutation.combine()
%Riptide.Mutation{delete: %{}, merge: %{"todo:info" => %{"0" => 0, "1" => 1, "2" => 2, "3" => 3}}}
Specs
Combines the right mutation into the left mutation and returns a singular mutation
Examples
iex> Riptide.Mutation.combine(
...> %Riptide.Mutation{delete: %{}, merge: %{"a" => true}},
...> %Riptide.Mutation{delete: %{}, merge: %{"b" => false}}
...> )
%Riptide.Mutation{delete: %{}, merge: %{"a" => true, "b" => false}}