Sha256: e198233ea146c338e75bc62c9d6ef52450fc0fff3f8926aad000944fd4872afa

Contents?: true

Size: 425 Bytes

Versions: 2

Compression:

Stored size: 425 Bytes

Contents

# frozen_string_literal: true

module Ductr
  module Sequel
    #
    # A source control that yields rows one by one.
    #
    class BasicSource < Ductr::ETL::Source
      #
      # Opens the database, calls the job's method and iterate over the query results.
      #
      # @yield The each block
      #
      # @return [void]
      #
      def each(&)
        call_method(adapter.db).each(&)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ductr-0.2.1 lib/ductr/sequel/basic_source.rb
ductr-0.2.0 lib/ductr/sequel/basic_source.rb