class NoSE::IndexDSL

DSL for index creation within a schema

Attributes

extra[R]
hash_fields[R]
order_fields[R]
path_keys[R]

Public Class Methods

new(schema) click to toggle source
# File lib/nose/schema.rb, line 54
def initialize(schema)
  @schema = schema
  @hash_fields = []
  @order_fields = []
  @extra = []
  @path_keys = []
end

Public Instance Methods

Extra(*fields) click to toggle source

Define a list of extra fields @return [void]

# File lib/nose/schema.rb, line 78
def Extra(*fields)
  @extra += fields.flatten
end
Hash(*fields) click to toggle source

Define a list of hash fields @return [void]

# File lib/nose/schema.rb, line 66
def Hash(*fields)
  @hash_fields += fields.flatten
end
Ordered(*fields) click to toggle source

Define a list of ordered fields @return [void]

# File lib/nose/schema.rb, line 72
def Ordered(*fields)
  @order_fields += fields.flatten
end
Path(*keys) click to toggle source

Define the keys for the index path @return [void]

# File lib/nose/schema.rb, line 84
def Path(*keys)
  @path_keys += keys
end