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.



11
12
13
14
15
# File 'lib/riak/time_series/deletion.rb', line 11

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.



8
9
10
# File 'lib/riak/time_series/deletion.rb', line 8

def client
  @client
end

#keyObject

Returns the value of attribute key.



5
6
7
# File 'lib/riak/time_series/deletion.rb', line 5

def key
  @key
end

#optionsObject

Returns the value of attribute options.



6
7
8
# File 'lib/riak/time_series/deletion.rb', line 6

def options
  @options
end

#table_nameObject (readonly)

Returns the value of attribute table_name.



9
10
11
# File 'lib/riak/time_series/deletion.rb', line 9

def table_name
  @table_name
end

Instance Method Details

#delete!Object



17
18
19
20
21
22
23
24
# File 'lib/riak/time_series/deletion.rb', line 17

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