Class: LogStash::PluginMixins::JdbcStreaming::ParameterHandler
- Inherits:
-
Object
- Object
- LogStash::PluginMixins::JdbcStreaming::ParameterHandler
show all
- Defined in:
- lib/logstash/plugin_mixins/jdbc_streaming/parameter_handler.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of ParameterHandler.
38
39
40
|
# File 'lib/logstash/plugin_mixins/jdbc_streaming/parameter_handler.rb', line 38
def initialize(given_value)
@given_value = given_value
end
|
Instance Attribute Details
#given_value ⇒ Object
Returns the value of attribute given_value.
36
37
38
|
# File 'lib/logstash/plugin_mixins/jdbc_streaming/parameter_handler.rb', line 36
def given_value
@given_value
end
|
Class Method Details
.build_bind_value_handler(given_value) ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/logstash/plugin_mixins/jdbc_streaming/parameter_handler.rb', line 19
def self.build_bind_value_handler(given_value)
handler = ConstantParameter.new(given_value)
return handler unless given_value.is_a?(String)
first_percent_curly = given_value.index("%{")
if first_percent_curly && given_value.index("}", first_percent_curly)
return InterpolatedParameter.new(given_value)
end
if given_value =~ /\A(\s*\[[^\]]+\]\s*)*\z/
return FieldParameter.new(given_value)
end
handler
end
|
.build_parameter_handler(given_value) ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/logstash/plugin_mixins/jdbc_streaming/parameter_handler.rb', line 6
def self.build_parameter_handler(given_value)
handler = FieldParameter.new(given_value)
return handler unless given_value.is_a?(String)
first_percent_curly = given_value.index("%{")
if first_percent_curly && given_value.index("}", first_percent_curly)
return InterpolatedParameter.new(given_value)
end
handler
end
|
Instance Method Details
42
43
44
|
# File 'lib/logstash/plugin_mixins/jdbc_streaming/parameter_handler.rb', line 42
def (event)
end
|