Class: Riak::TimeSeries::Deletion

Inherits:
Object
  • Object
show all
Defined in:
lib/riak/time_series/deletion.rb

Overview

Delete entries from Riak Time Series.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, table_name) ⇒ Deletion

Returns a new instance of Deletion.



25
26
27
28
29
# File 'lib/riak/time_series/deletion.rb', line 25

def initialize(client, table_name)
  @client = client
  @table_name = table_name
  @options = Hash.new
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



22
23
24
# File 'lib/riak/time_series/deletion.rb', line 22

def client
  @client
end

#keyObject

Returns the value of attribute key.



19
20
21
# File 'lib/riak/time_series/deletion.rb', line 19

def key
  @key
end

#optionsObject

Returns the value of attribute options.



20
21
22
# File 'lib/riak/time_series/deletion.rb', line 20

def options
  @options
end

#table_nameObject (readonly)

Returns the value of attribute table_name.



23
24
25
# File 'lib/riak/time_series/deletion.rb', line 23

def table_name
  @table_name
end

Instance Method Details

#delete!Object



31
32
33
34
35
36
37
38
# File 'lib/riak/time_series/deletion.rb', line 31

def delete!
  client.backend do |be|
    be.time_series_delete_operator.delete(table_name,
                                          key,
                                          options)
  end
  true
end