Class: LogStash::PluginMixins::JdbcStreaming::PreparedStatementHandler

Inherits:
StatementHandler
  • Object
show all
Includes:
Util::Loggable
Defined in:
lib/logstash/plugin_mixins/jdbc_streaming/statement_handler.rb

Instance Attribute Summary collapse

Attributes inherited from StatementHandler

#cache, #parameters, #statement

Instance Method Summary collapse

Methods inherited from StatementHandler

build_statement_handler, #initialize

Constructor Details

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

Instance Attribute Details

#bind_values_arrayObject (readonly)

Returns the value of attribute bind_values_array.



100
101
102
# File 'lib/logstash/plugin_mixins/jdbc_streaming/statement_handler.rb', line 100

def bind_values_array
  @bind_values_array
end

#nameObject (readonly)

Returns the value of attribute name.



100
101
102
# File 'lib/logstash/plugin_mixins/jdbc_streaming/statement_handler.rb', line 100

def name
  @name
end

#preparedObject (readonly)

Returns the value of attribute prepared.



100
101
102
# File 'lib/logstash/plugin_mixins/jdbc_streaming/statement_handler.rb', line 100

def prepared
  @prepared
end

#statement_preparedObject (readonly)

Returns the value of attribute statement_prepared.



100
101
102
# File 'lib/logstash/plugin_mixins/jdbc_streaming/statement_handler.rb', line 100

def statement_prepared
  @statement_prepared
end

Instance Method Details

#cache_lookup(db, event) ⇒ Object

Get from cache or performs remote lookup and saves to cache

Parameters:

  • db (Sequel::Database)
  • event (LogStash::Event)


106
107
108
109
# File 'lib/logstash/plugin_mixins/jdbc_streaming/statement_handler.rb', line 106

def cache_lookup(db, event)
  build_prepared_statement(db)
  common_cache_lookup(db, event)
end