Yoji Shidara
null+****@clear*****
Tue Feb 18 16:24:35 JST 2014
Yoji Shidara 2014-02-18 16:24:35 +0900 (Tue, 18 Feb 2014) New Revision: 1227dbd6da671db1fb82f520e7fac9631abf2783 https://github.com/droonga/fluent-plugin-droonga/commit/1227dbd6da671db1fb82f520e7fac9631abf2783 Message: schema: Make flags methods to return an array Modified files: lib/droonga/catalog/schema.rb test/unit/catalog/test_schema.rb Modified: lib/droonga/catalog/schema.rb (+3 -3) =================================================================== --- lib/droonga/catalog/schema.rb 2014-02-18 16:22:20 +0900 (b601c6d) +++ lib/droonga/catalog/schema.rb 2014-02-18 16:24:35 +0900 (f80df28) @@ -70,7 +70,7 @@ module Droonga end def flags - type_flag # TODO merge flags from ColumnIndexOptions + [type_flag] # TODO merge flags from ColumnIndexOptions end def value_type @@ -132,14 +132,14 @@ module Droonga end def flags - type_flag + [type_flag] end def to_table_create_body body = { "name" => name, "key_type" => key_type, - "flags" => flags + "flags" => flags.join("|") } if tokenizer Modified: test/unit/catalog/test_schema.rb (+2 -2) =================================================================== --- test/unit/catalog/test_schema.rb 2014-02-18 16:22:20 +0900 (459a528) +++ test/unit/catalog/test_schema.rb 2014-02-18 16:24:35 +0900 (4af2cb5) @@ -92,7 +92,7 @@ class CatalogSchemaTest < Test::Unit::TestCase end def test_flags - assert_equal("TABLE_HASH_KEY", + assert_equal(["TABLE_HASH_KEY"], create_table("table_name", { "type" => "Hash" @@ -144,7 +144,7 @@ class CatalogSchemaTest < Test::Unit::TestCase end def test_flags - assert_equal("COLUMN_SCALAR", + assert_equal(["COLUMN_SCALAR"], create_column("column_name", { "type" => "Scalar" -------------- next part -------------- HTML����������������������������...Download