[Groonga-commit] groonga/fluent-plugin-droonga [master] Remove needless local variable

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Apr 9 18:39:10 JST 2013


Kouhei Sutou	2013-04-09 18:39:10 +0900 (Tue, 09 Apr 2013)

  New Revision: 29b506a2f46f4dbfb16ab9ed8020775aa9f42d28
  https://github.com/groonga/fluent-plugin-droonga/commit/29b506a2f46f4dbfb16ab9ed8020775aa9f42d28

  Message:
    Remove needless local variable

  Modified files:
    lib/droonga/plugin/handler_search.rb

  Modified: lib/droonga/plugin/handler_search.rb (+5 -6)
===================================================================
--- lib/droonga/plugin/handler_search.rb    2013-04-09 18:38:05 +0900 (8b4879a)
+++ lib/droonga/plugin/handler_search.rb    2013-04-09 18:39:10 +0900 (f75bac2)
@@ -213,15 +213,15 @@ module Droonga
 
       def search_query(results)
         @start_time = Time.now
-        result = source = results[@query["source"]]
+        @result = source = results[@query["source"]]
         if @query["condition"]
           expression = Groonga::Expression.new(context: @context)
           expression.define_variable(:domain => source)
           parseCondition(source, expression, @query["condition"])
-          result = source.select(expression)
+          @result = source.select(expression)
         end
         if @query["groupBy"]
-          result = result.group(@query["groupBy"])
+          @result =****@resul*****(@query["groupBy"])
         end
         if @query["sortBy"]
           if @query["sortBy"].is_a? Array
@@ -235,10 +235,9 @@ module Droonga
           else
             raise '"sortBy" parameter must be a Hash or an Array'
           end
-          result = result.sort(keys, :offset => offset, :limit => limit)
+          @result =****@resul*****(keys, :offset => offset, :limit => limit)
         end
-        @result = result
-        result
+        @result
       end
     end
   end
-------------- next part --------------
HTML����������������������������...
Download 



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