Sha256: 9fc3e58e71ba78d138ecc234c65084e9cc9a56ef0261a5f5c6effca9bbf255ab

Contents?: true

Size: 470 Bytes

Versions: 2

Compression:

Stored size: 470 Bytes

Contents

# frozen_string_literal: true

module Ductr
  module SequelBase
    #
    # A lookup control that execute the query for a bunch of rows.
    #
    class BufferedLookup < Ductr::ETL::BufferedTransform
      #
      # Opens the database if needed, calls the job's method and pass the each block to it.
      #
      # @yield The each block
      #
      # @return [void]
      #
      def on_flush(&)
        call_method(adapter.db, buffer, &)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ductr-0.2.3 lib/ductr/sequel_base/buffered_lookup.rb
ductr-0.2.2 lib/ductr/sequel_base/buffered_lookup.rb