Class: Ductr::SequelBase::BasicDestination

Inherits:
ETL::Destination show all
Defined in:
lib/ductr/sequel_base/basic_destination.rb

Overview

A destination control that write rows one by one.

Instance Attribute Summary

Attributes inherited from ETL::Control

#adapter, #job_method, #options

Instance Method Summary collapse

Methods inherited from ETL::Destination

#close

Methods inherited from ETL::Control

#call_method, #initialize

Constructor Details

This class inherits a constructor from Ductr::ETL::Control

Instance Method Details

#write(row) ⇒ void

This method returns an undefined value.

Opens the database if needed and call the job’s method to insert one row at time.

Parameters:

  • row (Hash<Symbol, Object>)

    The row to insert, preferably a Hash



16
17
18
# File 'lib/ductr/sequel_base/basic_destination.rb', line 16

def write(row)
  call_method(adapter.db, row)
end