[Groonga-commit] groonga/groonga [master] [shcema][table-create] add [table][create] tag.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 12月 19日 (月) 13:13:09 JST


Kouhei Sutou	2011-12-19 04:13:09 +0000 (Mon, 19 Dec 2011)

  New Revision: aa439e9e1bf0eab49c757721343d9acc3f6aa89b

  Log:
    [shcema][table-create] add [table][create] tag.
    
    refs #915

  Modified files:
    lib/db.c
    test/unit/http/test-http-schema.rb

  Modified: lib/db.c (+5 -0)
===================================================================
--- lib/db.c    2011-12-19 04:01:29 +0000 (0794aad)
+++ lib/db.c    2011-12-19 04:13:09 +0000 (26d0baf)
@@ -616,6 +616,7 @@ grn_table_create_validate(grn_ctx *ctx, const char *name, unsigned name_size,
   case GRN_OBJ_TABLE_HASH_KEY :
     if (flags & GRN_OBJ_KEY_WITH_SIS) {
       ERR(GRN_INVALID_ARGUMENT,
+          "[table][create] "
           "key with SIS isn't available for hash table: <%.*s>",
           name_size, name);
     }
@@ -627,10 +628,12 @@ grn_table_create_validate(grn_ctx *ctx, const char *name, unsigned name_size,
   case GRN_OBJ_TABLE_NO_KEY :
     if (flags & GRN_OBJ_KEY_WITH_SIS) {
       ERR(GRN_INVALID_ARGUMENT,
+          "[table][create] "
           "key with SIS isn't available for no key table: <%.*s>",
           name_size, name);
     } else if (flags & GRN_OBJ_KEY_NORMALIZE) {
       ERR(GRN_INVALID_ARGUMENT,
+          "[table][create] "
           "key normalization isn't available for no key table: <%.*s>",
           name_size, name);
     }
@@ -638,10 +641,12 @@ grn_table_create_validate(grn_ctx *ctx, const char *name, unsigned name_size,
   case GRN_OBJ_TABLE_VIEW :
     if (flags & GRN_OBJ_KEY_WITH_SIS) {
       ERR(GRN_INVALID_ARGUMENT,
+          "[table][create] "
           "key with SIS isn't available for view table: <%.*s>",
           name_size, name);
     } else if (flags & GRN_OBJ_KEY_NORMALIZE) {
       ERR(GRN_INVALID_ARGUMENT,
+          "[table][create] "
           "key normalization isn't available for view table: <%.*s>",
           name_size, name);
     }

  Modified: test/unit/http/test-http-schema.rb (+10 -5)
===================================================================
--- test/unit/http/test-http-schema.rb    2011-12-19 04:01:29 +0000 (e18fcbe)
+++ test/unit/http/test-http-schema.rb    2011-12-19 04:13:09 +0000 (0b57539)
@@ -337,7 +337,8 @@ class HTTPSchemaTest < Test::Unit::TestCase
                                   :flags => Key::SIS,
                                   :key_type => "ShortText"))
       assert_error_response(Result::INVALID_ARGUMENT,
-                            "key with SIS isn't available " +
+                            "[table][create] " +
+                              "key with SIS isn't available " +
                               "for hash table: <users>",
                             response,
                             :content_type => "application/json")
@@ -533,7 +534,8 @@ class HTTPSchemaTest < Test::Unit::TestCase
                                   :name => "users",
                                   :flags => Table::NO_KEY | Key::NORMALIZE))
       assert_error_response(Result::INVALID_ARGUMENT,
-                            "key normalization isn't available " +
+                            "[table][create] " +
+                              "key normalization isn't available " +
                               "for no key table: <users>",
                             response,
                             :content_type => "application/json")
@@ -559,7 +561,8 @@ class HTTPSchemaTest < Test::Unit::TestCase
                                   :name => "users",
                                   :flags => Table::NO_KEY | Key::SIS))
       assert_error_response(Result::INVALID_ARGUMENT,
-                            "key with SIS isn't available " +
+                            "[table][create] " +
+                              "key with SIS isn't available " +
                               "for no key table: <users>",
                             response,
                             :content_type => "application/json")
@@ -625,7 +628,8 @@ class HTTPSchemaTest < Test::Unit::TestCase
                                   :name => "users",
                                   :flags => Table::VIEW | Key::NORMALIZE))
       assert_error_response(Result::INVALID_ARGUMENT,
-                            "key normalization isn't available " +
+                            "[table][create] " +
+                              "key normalization isn't available " +
                               "for view table: <users>",
                             response,
                             :content_type => "application/json")
@@ -651,7 +655,8 @@ class HTTPSchemaTest < Test::Unit::TestCase
                                   :name => "users",
                                   :flags => Table::VIEW | Key::SIS))
       assert_error_response(Result::INVALID_ARGUMENT,
-                            "key with SIS isn't available " +
+                            "[table][create] " +
+                              "key with SIS isn't available " +
                               "for view table: <users>",
                             response,
                             :content_type => "application/json")




Groonga-commit メーリングリストの案内
Back to archive index