[Groonga-commit] droonga/fluent-plugin-droonga at 7a001c6 [master] Validate date_range

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Feb 12 16:23:36 JST 2014


YUKI Hiroshi	2014-02-12 16:23:36 +0900 (Wed, 12 Feb 2014)

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

  Message:
    Validate date_range

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

  Modified: lib/droonga/catalog/base.rb (+5 -0)
===================================================================
--- lib/droonga/catalog/base.rb    2014-02-12 16:08:34 +0900 (2534a7f)
+++ lib/droonga/catalog/base.rb    2014-02-12 16:23:36 +0900 (06a0e62)
@@ -257,6 +257,7 @@ module Droonga
                                                  "#{name}.number_of_replicas")
         validate_positive_integer_parameter(dataset["workers"],
                                             "#{name}.workers")
+        validate_date_range(dataset["date_range"], "#{name}.date_range")
 
         validate_parameter_type(Hash, dataset["ring"], "#{name}.ring")
         dataset["ring"].each do |key, value|
@@ -266,6 +267,10 @@ module Droonga
         validate_parameter_type(Array, dataset["plugins"], "#{name}.plugins")
       end
 
+      def validate_date_range(value, name)
+        return if value == "infinity"
+      end
+
       def validate_ring(ring, name)
         validate_parameter_type(Hash, ring, name)
 
-------------- next part --------------
HTML����������������������������...
下載 



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