Yoji Shidara
null+****@clear*****
Wed Feb 26 14:49:50 JST 2014
Yoji Shidara 2014-02-26 14:49:50 +0900 (Wed, 26 Feb 2014) New Revision: 4ecc8313906dfce96c58d5810ae095ca1b1d05e5 https://github.com/droonga/fluent-plugin-droonga/commit/4ecc8313906dfce96c58d5810ae095ca1b1d05e5 Message: Make default table type to be Hash Modified files: lib/droonga/catalog/schema.rb test/unit/catalog/test_schema.rb Modified: lib/droonga/catalog/schema.rb (+1 -2) =================================================================== --- lib/droonga/catalog/schema.rb 2014-02-26 14:48:19 +0900 (3c6cf95) +++ lib/droonga/catalog/schema.rb 2014-02-26 14:49:50 +0900 (2b4cebb) @@ -127,7 +127,7 @@ module Droonga end def type - @data["type"] + @data["type"] || "Hash" end def key_type @@ -152,7 +152,6 @@ module Droonga "TABLE_PAT_KEY" when "DoubleArrayTrie" "TABLE_DAT_KEY" - # TODO default is Hash else # TODO raise appropriate error end Modified: test/unit/catalog/test_schema.rb (+6 -0) =================================================================== --- test/unit/catalog/test_schema.rb 2014-02-26 14:48:19 +0900 (7ce1d53) +++ test/unit/catalog/test_schema.rb 2014-02-26 14:49:50 +0900 (d60a57f) @@ -143,6 +143,12 @@ class CatalogSchemaTest < Test::Unit::TestCase {}).name) end + def test_type_default + assert_equal("Hash", + create_table("table_name", + {}).type) + end + def test_type assert_equal("Hash", create_table("table_name", -------------- next part -------------- HTML����������������������������... 下載