YUKI Hiroshi
null+****@clear*****
Thu Sep 12 19:10:24 JST 2013
YUKI Hiroshi 2013-09-12 19:10:24 +0900 (Thu, 12 Sep 2013) New Revision: 6d2a68d31e2941449cee9f826c5220b97182a31c https://github.com/droonga/fluent-plugin-droonga/commit/6d2a68d31e2941449cee9f826c5220b97182a31c Message: GroongaCommandConverter: Use Groonga::Command::Base#to_hash Modified files: lib/groonga_command_converter.rb test/test_groonga_command_converter.rb Modified: lib/groonga_command_converter.rb (+3 -28) =================================================================== --- lib/groonga_command_converter.rb 2013-09-12 18:33:21 +0900 (85a4fe5) +++ lib/groonga_command_converter.rb 2013-09-12 19:10:24 +0900 (b47f935) @@ -75,26 +75,11 @@ module Droonga end def create_table_create_command - body = { - :name => @command[:name], - :flags => @command[:flags], - :key_type => @command[:key_type], - :value_type => @command[:value_type], - :default_tokenizer => @command[:default_tokenizer], - :normalizer => @command[:normalizer], - } - create_envelope("table_create", body) + create_envelope("table_create", @command.to_hash) end def create_column_create_command - body = { - :table => @command[:table], - :name => @command[:name], - :flags => @command[:flags], - :type => @command[:type], - :source => @command[:source], - } - create_envelope("column_create", body) + create_envelope("column_create", @command.to_hash) end def split_load_command_to_add_commands(&block) @@ -122,17 +107,7 @@ module Droonga end def create_select_command - body = { - :table => @command[:table], - :sortby => @command[:sortby], - :scorer => @command[:scorer], - :query => @command[:query], - :filter => @command[:filter], - :conditions => @command[:conditions], - :drilldown => @command[:drilldown], - :output_columns => @command[:output_columns], - } - create_envelope("select", body) + create_envelope("select", @command.to_hash) end end end Modified: test/test_groonga_command_converter.rb (+0 -1) =================================================================== --- test/test_groonga_command_converter.rb 2013-09-12 18:33:21 +0900 (aa2ca3e) +++ test/test_groonga_command_converter.rb 2013-09-12 19:10:24 +0900 (e10a51b) @@ -46,7 +46,6 @@ class GroongaCommandConverterTest < Test::Unit::TestCase :name => "Terms", :flags => "TABLE_PAT_KEY", :key_type => "ShortText", - :value_type => nil, :default_tokenizer => "TokenBigram", :normalizer => "NormalizerAuto", }, -------------- next part -------------- HTML����������������������������... Télécharger