Sha256: 33c0131cb8548b44b8c26a14a3d3b86d5e2b50cff81626ee1b8792db9059397a

Contents?: true

Size: 436 Bytes

Versions: 2

Compression:

Stored size: 436 Bytes

Contents

# frozen_string_literal: true

module Ductr
  module Sequel
    #
    # 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.1 lib/ductr/sequel/buffered_destination.rb
ductr-0.2.0 lib/ductr/sequel/buffered_destination.rb