lib/logstash/plugin_mixins/jdbc/statement_handler.rb in logstash-input-jdbc-4.3.18 vs lib/logstash/plugin_mixins/jdbc/statement_handler.rb in logstash-input-jdbc-4.3.19
- old
+ new
@@ -27,14 +27,14 @@
class NormalStatementHandler < StatementHandler
# Performs the query, respecting our pagination settings, yielding once per row of data
# @param db [Sequel::Database]
# @param sql_last_value [Integet|DateTime|Time]
# @yieldparam row [Hash{Symbol=>Object}]
- def perform_query(db, sql_last_value)
+ def perform_query(db, sql_last_value, jdbc_paging_enabled, jdbc_page_size)
query = build_query(db, sql_last_value)
- if @jdbc_paging_enabled
- query.each_page(@jdbc_page_size) do |paged_dataset|
+ if jdbc_paging_enabled
+ query.each_page(jdbc_page_size) do |paged_dataset|
paged_dataset.each do |row|
yield row
end
end
else
@@ -72,10 +72,10 @@
# Performs the query, ignoring our pagination settings, yielding once per row of data
# @param db [Sequel::Database]
# @param sql_last_value [Integet|DateTime|Time]
# @yieldparam row [Hash{Symbol=>Object}]
- def perform_query(db, sql_last_value)
+ def perform_query(db, sql_last_value, jdbc_paging_enabled, jdbc_page_size)
query = build_query(db, sql_last_value)
query.each do |row|
yield row
end
end