Sha256: d4138e951533fe117fdec6654ea1671549ff91983d2e65b49c56383c2e5853ce

Contents?: true

Size: 440 Bytes

Versions: 2

Compression:

Stored size: 440 Bytes

Contents

# frozen_string_literal: true

module Ductr
  module SequelBase
    #
    # A destination control that accumulates rows in a buffer to write them by batch.
    #
    class BufferedDestination < Ductr::ETL::BufferedDestination
      #
      # Open the database if needed and call the job's method to run the query.
      #
      # @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_destination.rb
ductr-0.2.2 lib/ductr/sequel_base/buffered_destination.rb