Kouhei Sutou
null+****@clear*****
Wed Feb 3 17:43:25 JST 2016
Kouhei Sutou 2016-02-03 17:43:25 +0900 (Wed, 03 Feb 2016) New Revision: 9f49c28eb12c2ddff0e3a7039304d9eef494172a https://github.com/groonga/groonga/commit/9f49c28eb12c2ddff0e3a7039304d9eef494172a Message: Add inspect command It only supports GRN_TABLE_PAT_KEY partially for now. Added files: test/command/suite/inspect/table_pat_key.expected test/command/suite/inspect/table_pat_key.test Modified files: lib/grn_proc.h lib/proc.c lib/proc/sources.am Modified: lib/grn_proc.h (+1 -0) =================================================================== --- lib/grn_proc.h 2016-02-03 17:42:48 +0900 (7a79380) +++ lib/grn_proc.h 2016-02-03 17:43:25 +0900 (a5b03c5) @@ -33,6 +33,7 @@ void grn_proc_init_clearlock(grn_ctx *ctx); void grn_proc_init_config_get(grn_ctx *ctx); void grn_proc_init_config_set(grn_ctx *ctx); void grn_proc_init_config_delete(grn_ctx *ctx); +void grn_proc_init_inspect(grn_ctx *ctx); void grn_proc_init_lock_acquire(grn_ctx *ctx); void grn_proc_init_lock_clear(grn_ctx *ctx); void grn_proc_init_lock_release(grn_ctx *ctx); Modified: lib/proc.c (+2 -0) =================================================================== --- lib/proc.c 2016-02-03 17:42:48 +0900 (7d2d6a6) +++ lib/proc.c 2016-02-03 17:43:25 +0900 (d219f73) @@ -7110,4 +7110,6 @@ grn_db_init_builtin_query(grn_ctx *ctx) grn_proc_init_lock_acquire(ctx); grn_proc_init_lock_release(ctx); + + grn_proc_init_inspect(ctx); } Modified: lib/proc/sources.am (+1 -0) =================================================================== --- lib/proc/sources.am 2016-02-03 17:42:48 +0900 (f036e2d) +++ lib/proc/sources.am 2016-02-03 17:43:25 +0900 (2c564e9) @@ -1,5 +1,6 @@ libgrnproc_la_SOURCES = \ proc_config.c \ + proc_inspect.c \ proc_lock.c \ proc_schema.c \ proc_table.c Added: test/command/suite/inspect/table_pat_key.expected (+36 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/inspect/table_pat_key.expected 2016-02-03 17:43:25 +0900 (76e419d) @@ -0,0 +1,36 @@ +table_create Users TABLE_PAT_KEY ShortText +[[0,0.0,0.0],true] +load --table Users +[ +{"_key": "alice"}, +{"_key": "bob"} +] +[[0,0.0,0.0],2] +inspect Users +[ + [ + 0, + 0.0, + 0.0 + ], + { + "name": "Users", + "type": { + "id": 49, + "name": "table:pat_key" + }, + "key": { + "type": { + "id": 14, + "name": "ShortText", + "type": { + "id": 32, + "name": "type" + }, + "size": 4096 + }, + "total_size": 5, + "max_total_size": 4294967294 + } + } +] Added: test/command/suite/inspect/table_pat_key.test (+9 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/inspect/table_pat_key.test 2016-02-03 17:43:25 +0900 (5a1ef5b) @@ -0,0 +1,9 @@ +table_create Users TABLE_PAT_KEY ShortText + +load --table Users +[ +{"_key": "alice"}, +{"_key": "bob"} +] + +inspect Users -------------- next part -------------- HTML����������������������������...Download