[Groonga-commit] droonga/fluent-plugin-droonga at b9c2d66 [master] Validave value of date_range and partition_key

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Feb 12 17:34:57 JST 2014


YUKI Hiroshi	2014-02-12 17:34:57 +0900 (Wed, 12 Feb 2014)

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

  Message:
    Validave value of date_range and partition_key

  Modified files:
    lib/droonga/catalog/base.rb

  Modified: lib/droonga/catalog/base.rb (+8 -0)
===================================================================
--- lib/droonga/catalog/base.rb    2014-02-12 17:31:37 +0900 (ec9bbcf)
+++ lib/droonga/catalog/base.rb    2014-02-12 17:34:57 +0900 (87729f1)
@@ -67,6 +67,12 @@ module Droonga
       end
     end
 
+    class UnsupportedValue < ValidationError
+      def initialize(name, value, path)
+        super("\"#{value}\" is not supported for \"#{name}\".", path)
+      end
+    end
+
     class Base
       attr_reader :path, :base_path
       def initialize(data, path)
@@ -304,11 +310,13 @@ module Droonga
 
       def validate_date_range(value, name)
         return if value == "infinity"
+        raise UnsupportedValue(name, value, @path)
       end
 
       def validate_partition_key(value, name)
         validate_parameter_type(String, value, name)
         return if value == "_key"
+        raise UnsupportedValue(name, value, @path)
       end
 
       def validate_ring(ring, name)
-------------- next part --------------
HTML����������������������������...
Download 



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