Class: Riak::Client::BeefcakeProtobuffsBackend::TimeSeriesListOperator
Instance Attribute Summary
Attributes inherited from Operator
Instance Method Summary collapse
-
#initialize(backend, convert_timestamp) ⇒ TimeSeriesListOperator
constructor
A new instance of TimeSeriesListOperator.
- #list(table_name, block, options = { }) ⇒ Object
Constructor Details
#initialize(backend, convert_timestamp) ⇒ TimeSeriesListOperator
Returns a new instance of TimeSeriesListOperator.
10 11 12 13 |
# File 'lib/riak/client/beefcake/time_series_list_operator.rb', line 10 def initialize(backend, ) super(backend) @convert_timestamp = end |
Instance Method Details
#list(table_name, block, options = { }) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/riak/client/beefcake/time_series_list_operator.rb', line 15 def list(table_name, block, = { }) request = TsListKeysReq.new .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 |