anchor.diff:      {"riak_kv.ts_query", Bucket}.
   
   %%
  --spec missing_helper_module(Bucket::binary(), 
  +-spec missing_helper_module(Bucket::binary(),
                               BucketProps::{error,any()} | [proplists:property()]) -> #rpberrorresp{}.
   missing_helper_module(Bucket, {error, _}) ->
       missing_type_response(Bucket);
  
positive.code:                     0 ->
                          {reply, #tsputresp{}, State};
                      ErrorCount ->
                          {reply, make_rpberrresp(
                                    ?E_PUT, io_lib:format("Failed to put ~b record(s)", [ErrorCount])),
                           State}
                  end
              catch
                  Class:Exception ->
                      {reply, make_rpberrresp(?E_IRREG, to_string({Class, Exception}))}
              end;
          false ->
              {reply, make_rpberrresp(?E_IRREG, "Invalid data")};
          {_, {undef, _}} ->
              BucketProps = riak_core_bucket:get_bucket(Bucket),
              {reply, missing_helper_module(Bucket, BucketProps)}
      end;
  
  %% @ignore SELECT
  
negative.code: -spec missing_type_response(Bucket::binary()) -> #rpberrorresp{}.
  missing_type_response(Bucket) ->
      make_rpberrresp(
          ?E_MISSING_TYPE,
          io_lib:format("Failed to put records, bucket type ~s is missing.", [Bucket])).
  
  %%
  -spec not_timeseries_type_response(Bucket::binary()) -> #rpberrorresp{}.
  not_timeseries_type_response(Bucket) ->
      make_rpberrresp(
          ?E_NOT_TS_TYPE,
          io_lib:format("Attempt to put Time Series data to non Time Series bucket ~s.", [Bucket])).
  
  -spec missing_table_module_response(Bucket::binary()) -> #rpberrorresp{}.
  