YUKI Hiroshi
null+****@clear*****
Fri May 29 17:29:30 JST 2015
YUKI Hiroshi 2015-05-29 17:29:30 +0900 (Fri, 29 May 2015) New Revision: d7c30361a2c9a208a65e581d5d7519d89f44ba2f https://github.com/droonga/grn2drn/commit/d7c30361a2c9a208a65e581d5d7519d89f44ba2f Message: Allow to convert any type Groonga command Modified files: lib/grn2drn/command-converter.rb Modified: lib/grn2drn/command-converter.rb (+2 -25) =================================================================== --- lib/grn2drn/command-converter.rb 2015-05-29 17:02:21 +0900 (957dab3) +++ lib/grn2drn/command-converter.rb 2015-05-29 17:29:30 +0900 (08da4f5) @@ -32,15 +32,8 @@ module Grn2Drn def convert(input, &block) @command_parser.on_command do |command| - case command.name - when "table_create" - yield create_table_create_command(command) - when "table_remove" - yield create_table_remove_command(command) - when "column_create" - yield create_column_create_command(command) - when "select" - yield create_select_command(command) + unless command.name == "load" + yield create_message(command.name, command_to_body(command)) end end @@ -104,18 +97,6 @@ module Grn2Drn stringify_keys(command.arguments) end - def create_table_create_command(command) - create_message("table_create", command_to_body(command)) - end - - def create_table_remove_command(command) - create_message("table_remove", command_to_body(command)) - end - - def create_column_create_command(command) - create_message("column_create", command_to_body(command)) - end - def create_add_command(command, columns, record) table = command[:table] body = { @@ -141,9 +122,5 @@ module Grn2Drn create_message("add", body) end - - def create_select_command(command) - create_message("select", command_to_body(command)) - end end end -------------- next part -------------- HTML����������������������������...Download