[Groonga-commit] groonga/groonga-command-parser at 66bf06c [master] Support URI style "values" less load

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Aug 8 16:28:05 JST 2015


Kouhei Sutou	2015-08-08 16:28:05 +0900 (Sat, 08 Aug 2015)

  New Revision: 66bf06ce6c41baea500a2ee431c31affdf7bf8fd
  https://github.com/groonga/groonga-command-parser/commit/66bf06ce6c41baea500a2ee431c31affdf7bf8fd

  Message:
    Support URI style "values" less load

  Modified files:
    lib/groonga/command/parser.rb
    test/test-parser.rb

  Modified: lib/groonga/command/parser.rb (+7 -2)
===================================================================
--- lib/groonga/command/parser.rb    2015-08-08 16:17:26 +0900 (3660f70)
+++ lib/groonga/command/parser.rb    2015-08-08 16:28:05 +0900 (25661e6)
@@ -263,8 +263,13 @@ module Groonga
             @load_values_parser << @command[:values]
             reset
           else
-            @command.original_source << "\n"
-            @loading = true
+            if****@comma*****_format == :uri
+              on_load_complete(@command)
+              reset
+            else
+              @command.original_source << "\n"
+              @loading = true
+            end
           end
         else
           on_command(@command)

  Modified: test/test-parser.rb (+13 -0)
===================================================================
--- test/test-parser.rb    2015-08-08 16:17:26 +0900 (add2fe6)
+++ test/test-parser.rb    2015-08-08 16:28:05 +0900 (1ed60fa)
@@ -183,6 +183,19 @@ status
           end
         end
 
+        class URITest < self
+          def test_no_values
+            uri = "/d/load?table=Users"
+            @parser << uri
+            @parser << "\n"
+            assert_equal([
+                           [:load_start, uri],
+                           [:load_complete, uri],
+                         ],
+                         @events)
+          end
+        end
+
         class InlineTest < self
           class BracketTest < self
             def test_have_columns
-------------- next part --------------
HTML����������������������������...
다운로드 



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