Class: Ductr::SequelBase::BufferedLookup

Inherits:
ETL::BufferedTransform show all
Defined in:
lib/ductr/sequel_base/buffered_lookup.rb

Overview

A lookup control that execute the query for a bunch of rows.

Instance Attribute Summary

Attributes inherited from ETL::BufferedTransform

#buffer

Attributes inherited from ETL::Control

#adapter, #job_method, #options

Instance Method Summary collapse

Methods inherited from ETL::BufferedTransform

#buffer_size, #close, #flush_buffer, #process

Methods inherited from ETL::Transform

#close, #process

Methods inherited from ETL::Control

#call_method, #initialize

Constructor Details

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

Instance Method Details

#on_flush { ... } ⇒ void

This method returns an undefined value.

Opens the database if needed, calls the job’s method and pass the each block to it.

Yields:

  • The each block



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

def on_flush(&)
  call_method(adapter.db, buffer, &)
end