Class: LogStash::PluginMixins::Jdbc::StatementHandler
- Inherits:
-
Object
- Object
- LogStash::PluginMixins::Jdbc::StatementHandler
- Defined in:
- lib/logstash/plugin_mixins/jdbc/statement_handler.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
-
#statement ⇒ Object
readonly
Returns the value of attribute statement.
Class Method Summary collapse
Instance Method Summary collapse
- #build_query(db, sql_last_value) ⇒ Object
-
#initialize(plugin) ⇒ StatementHandler
constructor
A new instance of StatementHandler.
Constructor Details
#initialize(plugin) ⇒ StatementHandler
Returns a new instance of StatementHandler.
24 25 26 |
# File 'lib/logstash/plugin_mixins/jdbc/statement_handler.rb', line 24 def initialize(plugin) @statement = plugin.statement end |
Instance Attribute Details
#parameters ⇒ Object (readonly)
Returns the value of attribute parameters.
22 23 24 |
# File 'lib/logstash/plugin_mixins/jdbc/statement_handler.rb', line 22 def parameters @parameters end |
#statement ⇒ Object (readonly)
Returns the value of attribute statement.
22 23 24 |
# File 'lib/logstash/plugin_mixins/jdbc/statement_handler.rb', line 22 def statement @statement end |
Class Method Details
.build_statement_handler(plugin) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/logstash/plugin_mixins/jdbc/statement_handler.rb', line 5 def self.build_statement_handler(plugin) if plugin.use_prepared_statements klass = PreparedStatementHandler else if plugin.jdbc_paging_enabled if plugin.jdbc_paging_mode == "explicit" klass = ExplicitPagingModeStatementHandler else klass = PagedNormalStatementHandler end else klass = NormalStatementHandler end end klass.new(plugin) end |
Instance Method Details
#build_query(db, sql_last_value) ⇒ Object
28 29 30 |
# File 'lib/logstash/plugin_mixins/jdbc/statement_handler.rb', line 28 def build_query(db, sql_last_value) fail NotImplementedError # override in subclass end |