Class: LogStash::PluginMixins::Jdbc::PreparedStatementHandler
- Inherits:
-
StatementHandler
- Object
- StatementHandler
- LogStash::PluginMixins::Jdbc::PreparedStatementHandler
- Defined in:
- lib/logstash/plugin_mixins/jdbc/statement_handler.rb
Instance Attribute Summary collapse
-
#bind_values_array ⇒ Object
readonly
Returns the value of attribute bind_values_array.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#prepared ⇒ Object
readonly
Returns the value of attribute prepared.
-
#statement_prepared ⇒ Object
readonly
Returns the value of attribute statement_prepared.
Attributes inherited from StatementHandler
#parameters, #statement, #statement_logger
Instance Method Summary collapse
-
#perform_query(db, sql_last_value, jdbc_paging_enabled, jdbc_page_size) {|row| ... } ⇒ Object
Performs the query, ignoring our pagination settings, yielding once per row of data.
Methods inherited from StatementHandler
build_statement_handler, #initialize
Constructor Details
This class inherits a constructor from LogStash::PluginMixins::Jdbc::StatementHandler
Instance Attribute Details
#bind_values_array ⇒ Object (readonly)
Returns the value of attribute bind_values_array.
71 72 73 |
# File 'lib/logstash/plugin_mixins/jdbc/statement_handler.rb', line 71 def bind_values_array @bind_values_array end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
71 72 73 |
# File 'lib/logstash/plugin_mixins/jdbc/statement_handler.rb', line 71 def name @name end |
#prepared ⇒ Object (readonly)
Returns the value of attribute prepared.
71 72 73 |
# File 'lib/logstash/plugin_mixins/jdbc/statement_handler.rb', line 71 def prepared @prepared end |
#statement_prepared ⇒ Object (readonly)
Returns the value of attribute statement_prepared.
71 72 73 |
# File 'lib/logstash/plugin_mixins/jdbc/statement_handler.rb', line 71 def statement_prepared @statement_prepared end |
Instance Method Details
#perform_query(db, sql_last_value, jdbc_paging_enabled, jdbc_page_size) {|row| ... } ⇒ Object
Performs the query, ignoring our pagination settings, yielding once per row of data
77 78 79 80 81 82 |
# File 'lib/logstash/plugin_mixins/jdbc/statement_handler.rb', line 77 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 |