[Groonga-commit] groonga/fluent-plugin-droonga at c5116b6 [master] test adapter_select: add a test that checks a pattern match_columns has multiple columns

Back to archive index

Kosuke Asami null+****@clear*****
Tue Jul 23 16:12:21 JST 2013


Kosuke Asami	2013-07-23 16:12:21 +0900 (Tue, 23 Jul 2013)

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

  Message:
    test adapter_select: add a test that checks a pattern match_columns has multiple columns

  Modified files:
    test/plugin/adapter/groonga/test_select.rb

  Modified: test/plugin/adapter/groonga/test_select.rb (+35 -0)
===================================================================
--- test/plugin/adapter/groonga/test_select.rb    2013-07-23 16:10:30 +0900 (b11247a)
+++ test/plugin/adapter/groonga/test_select.rb    2013-07-23 16:12:21 +0900 (91a1338)
@@ -130,6 +130,41 @@ class AdapterGroongaSelectTest < Test::Unit::TestCase
         }
         assert_equal(expected_search_request, convert(select_request))
       end
+
+      def test_multiple_columns
+        select_request = {
+          "table"          => "EmptyTable",
+          "match_columns"  => "_key || content",
+          "query"          => "QueryTest",
+          "output_columns" => "_id",
+        }
+
+        expected_search_request = {
+          "queries" => {
+            "EmptyTable" => {
+              "source"   => "EmptyTable",
+              "condition"=> {
+                "query"  => "QueryTest",
+                "matchTo"=> ["_key", "content"],
+                "defaultOperator"=> "&&",
+                "allowPragma"=> false,
+                "allowColumn"=> true,
+              },
+              "output"   => {
+                "elements"   => [
+                  "startTime",
+                  "elapsedTime",
+                  "count",
+                  "attributes",
+                  "records",
+                ],
+                "attributes" => ["_id"],
+              },
+            },
+          },
+        }
+        assert_equal(expected_search_request, convert(select_request))
+      end
     end
   end
 
-------------- next part --------------
HTML����������������������������...
Download 



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