Class: Groonga::Client::Response::Schema::Column

Inherits:
Hash
  • Object
show all
Includes:
Hashie::Extensions::MethodAccess
Defined in:
lib/groonga/client/response/schema.rb

Overview

Since:

  • 0.2.2

Instance Method Summary collapse

Constructor Details

#initialize(schema, raw_column) ⇒ Column

Returns a new instance of Column.

Since:

  • 0.2.2



214
215
216
217
218
219
220
# File 'lib/groonga/client/response/schema.rb', line 214

def initialize(schema, raw_column)
  @schema = schema
  super()
  raw_column.each do |key, value|
    self[key] = value
  end
end

Instance Method Details

#[]=(key, value) ⇒ Object

Since:

  • 0.2.2



222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/groonga/client/response/schema.rb', line 222

def []=(key, value)
  case key.to_sym
  when :indexes
    super(key, coerce_indexes(value))
  when :value_type
    value = ValueType.new(value) unless value.nil?
    super(key, value)
  when :command
    super(key, Command.new(value))
  else
    super
  end
end

#have_full_text_search_index?Boolean

Returns:

  • (Boolean)

Since:

  • 0.2.2



236
237
238
239
240
# File 'lib/groonga/client/response/schema.rb', line 236

def have_full_text_search_index?
  indexes.any? do |index|
    index.full_text_searchable?
  end
end