class Grn2Drn::SchemaConverter::Schema
Public Class Methods
new()
click to toggle source
# File lib/grn2drn/schema-converter.rb, line 60 def initialize @tables = {} end
Public Instance Methods
on_column_create_command(command)
click to toggle source
# File lib/grn2drn/schema-converter.rb, line 68 def on_column_create_command(command) table_name = command.table table = @tables[table_name] raise UnknownTable.new(table_name) if table.nil? table.add_column(command[:name], Column.new(command)) end
on_table_create_command(command)
click to toggle source
# File lib/grn2drn/schema-converter.rb, line 64 def on_table_create_command(command) @tables[command[:name]] = Table.new(command) end
to_droonga_schema()
click to toggle source
# File lib/grn2drn/schema-converter.rb, line 76 def to_droonga_schema droonga_schema = {} @tables.each do |name, table| droonga_schema[name] = table.to_droonga_schema end droonga_schema end