Class: Ductr::SQLite::BasicDestination

Inherits:
ETL::Destination
  • Object
show all
Defined in:
lib/ductr/sqlite/basic_destination.rb

Overview

A destination control that write rows one by one, registered as :basic:

destination :some_sqlite_database, :basic def my_destination(db, row) db[:items].insert(row) end

Instance Method Summary collapse

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



23
24
25
# File 'lib/ductr/sqlite/basic_destination.rb', line 23

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