[Groonga-commit] droonga/fluent-plugin-droonga at 56aee5d [master] select: Do not return records when result is empty

Back to archive index

Yoji Shidara null+****@clear*****
Tue Nov 19 13:22:09 JST 2013


Yoji Shidara	2013-11-19 13:22:09 +0900 (Tue, 19 Nov 2013)

  New Revision: 56aee5dce8d97894e06b8bdbb536140b427b77d4
  https://github.com/droonga/fluent-plugin-droonga/commit/56aee5dce8d97894e06b8bdbb536140b427b77d4

  Message:
    select: Do not return records when result is empty
    
    In order to keep compatibility with Groonga's select command.

  Modified files:
    lib/droonga/plugin/adapter/groonga/select.rb

  Modified: lib/droonga/plugin/adapter/groonga/select.rb (+6 -1)
===================================================================
--- lib/droonga/plugin/adapter/groonga/select.rb    2013-11-19 11:47:37 +0900 (00e9423)
+++ lib/droonga/plugin/adapter/groonga/select.rb    2013-11-19 13:22:09 +0900 (01e9261)
@@ -76,7 +76,12 @@ module Droonga
           end
 
           header = [status_code, start_time_in_unix_time, elapsed_time]
-          results = [[count], converted_attributes, value["records"]]
+          records = value["records"]
+          if records.empty?
+            results = [[count], converted_attributes]
+          else
+            results = [[count], converted_attributes, records]
+          end
           body = [results]
 
           [header, body]
-------------- next part --------------
HTML����������������������������...
Download 



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