Class: Riak::Client::BeefcakeProtobuffsBackend::TimeSeriesDeleteOperator

Inherits:
Operator
  • Object
show all
Defined in:
lib/riak/client/beefcake/time_series_delete_operator.rb

Instance Attribute Summary

Attributes inherited from Operator

#backend

Instance Method Summary collapse

Methods inherited from Operator

#initialize

Constructor Details

This class inherits a constructor from Riak::Client::BeefcakeProtobuffsBackend::Operator

Instance Method Details

#delete(table_name, key_components, options = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/riak/client/beefcake/time_series_delete_operator.rb', line 10

def delete(table_name, key_components, options = {})
  codec = TsCellCodec.new

  request_options = options.merge(table: table_name,
                                  key: codec.cells_for(key_components))

  request = TsDelReq.new request_options

  backend.protocol do |p|
    p.write :TsDelReq, request
    p.expect :TsDelResp, TsDelResp, empty_body_acceptable: true
  end
end