case put_raw(Table, Key, Value, SecIdxs) of
ok ->
ok;
- Error ->
+ {error, _} = Error ->
log_error(Error, put, [{record, Rec},
{index_info, IndexInfo}]),
Error
[Term]
end
end, Objs)};
+ {ok, []} ->
+ {ok, []};
{error, notfound} ->
{ok, []};
{error, _} = Error ->
Term ->
{ok, Term}
end;
- Error ->
+ {error, _} = Error ->
log_error(Error, get, [{table, Table},
{key, Key}]),
Error
end, Vals)};
{error, notfound} ->
{ok, []};
- Error ->
+ {error, _} = Error ->
log_error(Error, get_by_index,
[{table, Table},
{index, Index},
end, Vals)};
{error, notfound} ->
{ok, []};
- Error ->
+ {error, _} = Error ->
log_error(Error, get_by_index_range,
[{table, Table}, {index, Index},
{start_key, FromKey}, {end_key, ToKey}]),
case get_object_raw(Table, Key) of
{ok, Obj} ->
{ok, riakc_obj:get_value(Obj)};
- Error ->
+ {error, _} = Error ->
Error
end.
[{map, {modfun, ?MODULE, map_key}, none, true}]) of
{ok, [{_, Keys}]} ->
{ok, Keys};
+ {ok, []} ->
+ {ok, []};
{error, _} = Error ->
log_error(Error, get_keys, [{table, Table}]),
Error
[{map, {modfun, ?MODULE, map_key}, none, true}]) of
{ok, [{_, Keys}]} ->
{ok, Keys};
+ {ok, []} ->
+ {ok, []};
{error, _} = Error ->
log_error(Error, get_keys_by_index, [{table, Table},
{index, Index},
none, true}]) of
{ok, [{_, Objs}]} ->
{ok, Objs};
+ {ok, []} ->
+ {ok, []};
{error, _} = Error ->
Error
end.
none, true}]) of
{ok, [{_, Objs}]} ->
{ok, Objs};
+ {ok, []} ->
+ {ok, []};
{error, _} = Error ->
Error
end.
{ok, Cnt};
{error, notfound} ->
{ok, 0};
- Error ->
+ {error, _} = Error ->
log_error(Error, count_by_index,
[{table, Tab},
{index, Index},