[Groonga-commit] droonga/fluent-plugin-droonga at 2d431c5 [master] Set "Scalar" as default for type of column

Back to archive index

Yoji Shidara null+****@clear*****
Wed Feb 26 15:37:19 JST 2014


Yoji Shidara	2014-02-26 15:37:19 +0900 (Wed, 26 Feb 2014)

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

  Message:
    Set "Scalar" as default for type of column

  Modified files:
    lib/droonga/catalog/schema.rb
    test/unit/catalog/test_schema.rb

  Modified: lib/droonga/catalog/schema.rb (+1 -1)
===================================================================
--- lib/droonga/catalog/schema.rb    2014-02-26 15:27:56 +0900 (0974436)
+++ lib/droonga/catalog/schema.rb    2014-02-26 15:37:19 +0900 (fe9f754)
@@ -64,7 +64,7 @@ module Droonga
         end
 
         def type
-          @data["type"]
+          @data["type"] || "Scalar"
         end
 
         def type_flag

  Modified: test/unit/catalog/test_schema.rb (+6 -0)
===================================================================
--- test/unit/catalog/test_schema.rb    2014-02-26 15:27:56 +0900 (55bb1e9)
+++ test/unit/catalog/test_schema.rb    2014-02-26 15:37:19 +0900 (5c7950e)
@@ -235,6 +235,12 @@ class CatalogSchemaTest < Test::Unit::TestCase
                                    }).type)
       end
 
+      def test_type_default
+        assert_equal("Scalar",
+                     create_column("column_name",
+                                   {}).type)
+      end
+
       def test_flags
         assert_equal(["COLUMN_SCALAR"],
                      create_column("column_name",
-------------- next part --------------
HTML����������������������������...
Download 



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