class LogStash::Inputs::Elasticsearch::ColumnSpec
Class representing a column specification in the ESQL response The class’s main purpose is to provide a structure for the event key columns is an array with ‘name` and `type` pair (example: `{“name”=>“@timestamp”, “type”=>“date”}`) @attr_reader :name [String] The name of the column @attr_reader :type [String] The type of the column
Attributes
Public Class Methods
Source
# File lib/logstash/inputs/elasticsearch/esql.rb, line 137 def initialize(spec) @name = isolate(spec.fetch('name')) @type = isolate(spec.fetch('type')) end
Public Instance Methods
Source
# File lib/logstash/inputs/elasticsearch/esql.rb, line 142 def field_reference @_field_reference ||= '[' + name.gsub('.', '][') + ']' end
Private Instance Methods
Source
# File lib/logstash/inputs/elasticsearch/esql.rb, line 147 def isolate(value) value.frozen? ? value : value.clone.freeze end