Sha256: 4244bfef6cb6be1ab933dfc84693f4ea1132067378b0885a6961f4ec29ac4575

Contents?: true

Size: 542 Bytes

Versions: 3

Compression:

Stored size: 542 Bytes

Contents

module Itiel
  module Extract
    #
    # Extracts all the contents from a Database table into the stream
    # and passes it on to it's next_step
    #
    # Usage:
    #
    #     @extractor            = Itiel::Extract::DatabaseTable.new
    #     @extractor.connection = :test
    #     @extractor.table_name = 'test_table'
    #
    #
    class DatabaseTable < CustomSQL
      attr_accessor :table_name

      def extract
        db = self.class.sequel_connection(connection)
        db[table_name.to_sym].all
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
itiel-0.1.2 lib/itiel/extract/database_table.rb
itiel-0.1.1 lib/itiel/extract/database_table.rb
itiel-0.1.0 lib/itiel/extract/database_table.rb