[Groonga-commit] droonga/droonga-engine at 77f74b9 [master] Allow to disable "allowPragma" and "allowColumn".

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Oct 7 11:41:02 JST 2014


YUKI Hiroshi	2014-10-07 11:41:02 +0900 (Tue, 07 Oct 2014)

  New Revision: 77f74b963de64fd9ac34216b1a1440801d03ac6a
  https://github.com/droonga/droonga-engine/commit/77f74b963de64fd9ac34216b1a1440801d03ac6a

  Message:
    Allow to disable "allowPragma" and "allowColumn".
    
    In old versions, allowPragma=false or allowColumn=false are wrongly ignroed...

  Modified files:
    lib/droonga/searcher.rb

  Modified: lib/droonga/searcher.rb (+6 -4)
===================================================================
--- lib/droonga/searcher.rb    2014-10-07 11:12:26 +0900 (71ff97d)
+++ lib/droonga/searcher.rb    2014-10-07 11:41:02 +0900 (77a4df1)
@@ -265,6 +265,8 @@ module Droonga
         query = condition["query"]
         if query
           options[:syntax] = :query
+          options[:allow_pragma] = true
+          options[:allow_column] = true
           if condition["defaultOperator"]
             default_operator_string = condition["defaultOperator"]
             default_operator = OPERATOR_CONVERSION_TABLE[default_operator_string]
@@ -273,11 +275,11 @@ module Droonga
             end
             options[:default_operator] = default_operator
           end
-          if condition["allowPragma"]
-            options[:allow_pragma] = true
+          unless condition["allowPragma"]
+            options[:allow_pragma] = false
           end
-          if condition["allowColumn"]
-            options[:allow_column] = true
+          unless condition["allowColumn"]
+            options[:allow_column] = false
           end
           syntax_errors = [
             Groonga::SyntaxError,
-------------- next part --------------
HTML����������������������������...
Download 



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