class LogStash::PluginMixins::JdbcStreaming::NormalStatementHandler
Public Instance Methods
cache_lookup(db, event)
click to toggle source
Get from cache or performs remote lookup and saves to cache @param db [Sequel::Database] @param event [LogStash::Event] @returnparam [CachePayload]
# File lib/logstash/plugin_mixins/jdbc_streaming/statement_handler.rb, line 77 def cache_lookup(db, event) common_cache_lookup(db, event) end
Private Instance Methods
execute_extract_records(db, params, result)
click to toggle source
# File lib/logstash/plugin_mixins/jdbc_streaming/statement_handler.rb, line 83 def execute_extract_records(db, params, result) dataset = db[statement, params] # returns a Sequel dataset dataset.all do |row| result.push row.inject({}){|hash,(k,v)| hash[k.to_s] = v; hash} # Stringify row keys end end
post_init(plugin)
click to toggle source
# File lib/logstash/plugin_mixins/jdbc_streaming/statement_handler.rb, line 90 def post_init(plugin) @parameters = plugin.parameters end