[Groonga-commit] droonga/fluent-plugin-droonga at 3a151bf [master] Convert a Groonga generic response to a raw Groonga response

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Jan 24 13:43:24 JST 2014


YUKI Hiroshi	2014-01-24 13:43:24 +0900 (Fri, 24 Jan 2014)

  New Revision: 3a151bfbae179f15fc6525063b1e0369719ddd76
  https://github.com/droonga/fluent-plugin-droonga/commit/3a151bfbae179f15fc6525063b1e0369719ddd76

  Message:
    Convert a Groonga generic response to a raw Groonga response

  Modified files:
    lib/droonga/plugin/input_adapter/groonga.rb
    lib/droonga/plugin/output_adapter/groonga.rb

  Modified: lib/droonga/plugin/input_adapter/groonga.rb (+16 -1)
===================================================================
--- lib/droonga/plugin/input_adapter/groonga.rb    2014-01-24 13:35:35 +0900 (331a85d)
+++ lib/droonga/plugin/input_adapter/groonga.rb    2014-01-24 13:43:24 +0900 (759bef3)
@@ -1,4 +1,4 @@
-# Copyright (C) 2013 Droonga Project
+# Copyright (C) 2013-2014 Droonga Project
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -28,6 +28,21 @@ module Droonga
       input_message.command = "search"
       input_message.body = search_request
     end
+
+    command :table_create
+    def table_create(input_message)
+      input_message.add_route("groonga_generic_response")
+    end
+
+    command :table_remove
+    def table_remove(input_message)
+      input_message.add_route("groonga_generic_response")
+    end
+
+    command :column_create
+    def column_create(input_message)
+      input_message.add_route("groonga_generic_response")
+    end
   end
 end
 

  Modified: lib/droonga/plugin/output_adapter/groonga.rb (+6 -1)
===================================================================
--- lib/droonga/plugin/output_adapter/groonga.rb    2014-01-24 13:35:35 +0900 (3354780)
+++ lib/droonga/plugin/output_adapter/groonga.rb    2014-01-24 13:43:24 +0900 (7cf7726)
@@ -1,4 +1,4 @@
-# Copyright (C) 2013 Droonga Project
+# Copyright (C) 2013-2014 Droonga Project
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -24,6 +24,11 @@ module Droonga
       command = Select.new
       output_message.body = command.convert(output_message.body)
     end
+
+    command :groonga_generic_response
+    def groonga_generic_response(output_message)
+      output_message.body = output_message.body["result"]
+    end
   end
 end
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index