Sha256: dbf81a3943c6c7f774372c55b4e1da8399fa2ab2f4de165398a686f82208be06

Contents?: true

Size: 534 Bytes

Versions: 2

Compression:

Stored size: 534 Bytes

Contents

# frozen_string_literal: true

module Index
  class Event
    include Mindex::Index

    def self.reset_settings!
      @connection_settings  = nil
      @index_settings       = nil
      @index_mappings       = nil
      @index_prefix         = nil
      @index_label          = nil
      @index_num_threads    = nil
    end

    def self.scroll(_options = {})
      DB[:events].select.each_slice(500) do |events|
        yield events
      end
    end

    def self.fetch(ids)
      DB[:events].where(id: ids).all
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mindex-0.2.0 spec/dummy/index/event.rb
mindex-0.1.0 spec/dummy/index/event.rb