Skip to content

Commit

Permalink
Merge pull request #277 from basho/fixup-az-post_ttb_and_develop_merge
Browse files Browse the repository at this point in the history
Fixup az post ttb and develop merge
  • Loading branch information
Brett Hazen committed Apr 19, 2016
2 parents 46d1a8c + bff6899 commit 6786f04
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions src/riakc_ts.erl
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ query(Pid, Query, Interpolations, Cover) ->
%% list of values, in the second element, or an @{error, Reason@}
%% tuple.
query(Pid, Query, Interpolations, undefined, Options) ->
query_common(Pid, Query, Interpolations, undefined, Options);
query_common(Pid, Query, Interpolations, undefined, Options);
query(Pid, Query, Interpolations, Cover, Options) when is_binary(Cover) ->
query_common(Pid, Query, Interpolations, Cover, Options).
query_common(Pid, Query, Interpolations, Cover, Options).

query_common(Pid, Query, Interpolations, Cover, Options)
when is_pid(Pid), is_list(Query) ->
Expand All @@ -90,14 +90,19 @@ query_common(Pid, Query, Interpolations, Cover, Options)


%% @doc Generate a parallel coverage plan for the specified query
-spec get_coverage(Pid::pid(),
Table::binary(),
QueryText::binary()) -> {ok, Entries::[term()]} | {error, term()} | {'EXIT', any()}.
get_coverage(Pid, Table, QueryText) ->
server_call(Pid,
#tscoveragereq{query = #tsinterpolation{base = iolist_to_binary(QueryText)},
replace_cover = undefined,
table = iolist_to_binary(Table)}).
-spec get_coverage(pid(), table_name(), QueryText::iolist()) ->
{ok, Entries::[term()]} | {error, term()}.
get_coverage(Pid, Table, Query) ->
Message =
#tscoveragereq{query = #tsinterpolation{base = iolist_to_binary(Query)},
replace_cover = undefined,
table = iolist_to_binary(Table)},
case server_call(Pid, Message) of
{ok, Entries} ->
{ok, riak_pb_ts_codec:decode_cover_list(Entries)};
{error, Reason} ->
{error, Reason}
end.


-spec put(pid(),
Expand Down

0 comments on commit 6786f04

Please sign in to comment.