Class: Droonga::Catalog::Schema

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

Defined Under Namespace

Classes: Column, ColumnIndexOptions, ColumnVectorOptions, Table

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dataset_name, raw) ⇒ Schema

Returns a new instance of Schema.



171
172
173
174
175
176
177
178
# File 'lib/droonga/catalog/schema.rb', line 171

def initialize(dataset_name, raw)
  @dataset_name = dataset_name
  @raw = raw || []
  @tables = {}
  @raw.each do |table_name, raw_table|
    @tables[table_name] = Table.new(table_name, raw_table)
  end
end

Instance Attribute Details

#tablesObject (readonly)

Returns the value of attribute tables.



170
171
172
# File 'lib/droonga/catalog/schema.rb', line 170

def tables
  @tables
end

Instance Method Details

#==(other) ⇒ Object



180
181
182
183
# File 'lib/droonga/catalog/schema.rb', line 180

def ==(other)
  self.class == other.class and
    tables == other.tables
end