Class: Riak::Client::BeefcakeProtobuffsBackend::TimeSeriesListOperator

Inherits:
Operator
  • Object
show all
Defined in:
lib/riak/client/beefcake/time_series_list_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

#list(table_name, block, options = { }) ⇒ Object


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

def list(table_name, block, options = {  })
  request = TsListKeysReq.new options.merge(table: table_name)

  return streaming_list_keys(request, &block) unless block.nil?

  Riak::TimeSeries::Collection.new.tap do |key_buffer|
    streaming_list_keys(request) do |key_row|
      key_buffer << key_row
    end
  end
end