Class: Droonga::Catalog::Schema::ColumnIndexOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/droonga/catalog/schema.rb

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ ColumnIndexOptions

Returns a new instance of ColumnIndexOptions.



38
39
40
# File 'lib/droonga/catalog/schema.rb', line 38

def initialize(data)
  @data = data
end

Instance Method Details

#flagsObject



58
59
60
61
62
63
64
# File 'lib/droonga/catalog/schema.rb', line 58

def flags
  flags = []
  flags << "WITH_SECTION"  if section
  flags << "WITH_WEIGHT"   if weight
  flags << "WITH_POSITION" if position
  flags
end

#positionObject



50
51
52
# File 'lib/droonga/catalog/schema.rb', line 50

def position
  @data["position"]
end

#sectionObject



42
43
44
# File 'lib/droonga/catalog/schema.rb', line 42

def section
  @data["section"]
end

#sourcesObject



54
55
56
# File 'lib/droonga/catalog/schema.rb', line 54

def sources
  @data["sources"]
end

#weightObject



46
47
48
# File 'lib/droonga/catalog/schema.rb', line 46

def weight
  @data["weight"]
end