[Groonga-commit] groonga/groonga at 333226a [master] inspect: add object ID

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Feb 3 18:28:29 JST 2016


Kouhei Sutou	2016-02-03 18:28:29 +0900 (Wed, 03 Feb 2016)

  New Revision: 333226abc6706e7ecd976b2418310c1772574ed9
  https://github.com/groonga/groonga/commit/333226abc6706e7ecd976b2418310c1772574ed9

  Message:
    inspect: add object ID

  Modified files:
    lib/proc/proc_inspect.c
    test/command/suite/inspect/table_hash_key.expected
    test/command/suite/inspect/table_pat_key.expected

  Modified: lib/proc/proc_inspect.c (+6 -2)
===================================================================
--- lib/proc/proc_inspect.c    2016-02-03 18:04:31 +0900 (807488b)
+++ lib/proc/proc_inspect.c    2016-02-03 18:28:29 +0900 (93491d0)
@@ -90,8 +90,10 @@ command_inspect_table_hash_key(grn_ctx *ctx, grn_obj *obj)
 {
   grn_hash *hash = (grn_hash *)obj;
 
-  grn_ctx_output_map_open(ctx, "object", 3);
+  grn_ctx_output_map_open(ctx, "object", 4);
   {
+    grn_ctx_output_cstr(ctx, "id");
+    grn_ctx_output_uint64(ctx, grn_obj_id(ctx, obj));
     grn_ctx_output_cstr(ctx, "name");
     command_inspect_obj_name(ctx, obj);
     grn_ctx_output_cstr(ctx, "type");
@@ -122,8 +124,10 @@ command_inspect_table_pat_key(grn_ctx *ctx, grn_obj *obj)
 {
   grn_pat *pat = (grn_pat *)obj;
 
-  grn_ctx_output_map_open(ctx, "object", 3);
+  grn_ctx_output_map_open(ctx, "object", 4);
   {
+    grn_ctx_output_cstr(ctx, "id");
+    grn_ctx_output_uint64(ctx, grn_obj_id(ctx, obj));
     grn_ctx_output_cstr(ctx, "name");
     command_inspect_obj_name(ctx, obj);
     grn_ctx_output_cstr(ctx, "type");

  Modified: test/command/suite/inspect/table_hash_key.expected (+1 -0)
===================================================================
--- test/command/suite/inspect/table_hash_key.expected    2016-02-03 18:04:31 +0900 (a858863)
+++ test/command/suite/inspect/table_hash_key.expected    2016-02-03 18:28:29 +0900 (b99ff02)
@@ -14,6 +14,7 @@ inspect Users
     0.0
   ],
   {
+    "id": 256,
     "name": "Users",
     "type": {
       "id": 48,

  Modified: test/command/suite/inspect/table_pat_key.expected (+1 -0)
===================================================================
--- test/command/suite/inspect/table_pat_key.expected    2016-02-03 18:04:31 +0900 (76e419d)
+++ test/command/suite/inspect/table_pat_key.expected    2016-02-03 18:28:29 +0900 (f3e70d5)
@@ -14,6 +14,7 @@ inspect Users
     0.0
   ],
   {
+    "id": 256,
     "name": "Users",
     "type": {
       "id": 49,
-------------- next part --------------
HTML����������������������������...
Download 



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