Class: LogStash::PluginMixins::Jdbc::NormalStatementHandler

Inherits:
StatementHandler show all
Defined in:
lib/logstash/plugin_mixins/jdbc/statement_handler.rb

Direct Known Subclasses

PagedNormalStatementHandler

Instance Attribute Summary

Attributes inherited from StatementHandler

#parameters, #statement, #statement_logger

Instance Method Summary collapse

Methods inherited from StatementHandler

build_statement_handler, #initialize

Constructor Details

This class inherits a constructor from LogStash::PluginMixins::Jdbc::StatementHandler

Instance Method Details

#perform_query(db, sql_last_value) {|row| ... } ⇒ Object

Performs the query, yielding once per row of data

Parameters:

  • db (Sequel::Database)
  • sql_last_value (Integer|DateTime|Time)

Yield Parameters:

  • row (Hash{Symbol=>Object})


44
45
46
47
48
49
# File 'lib/logstash/plugin_mixins/jdbc/statement_handler.rb', line 44

def perform_query(db, sql_last_value)
  query = build_query(db, sql_last_value)
  query.each do |row|
    yield row
  end
end