susumu.yata
null+****@clear*****
Tue Nov 24 16:17:11 JST 2015
susumu.yata 2015-11-24 16:17:11 +0900 (Tue, 24 Nov 2015) New Revision: 9dda7a3eb3af123019012f0c477bdb7f8d6bc189 https://github.com/groonga/groonga/commit/9dda7a3eb3af123019012f0c477bdb7f8d6bc189 Message: grn_ts: update interfaces of grn_ts_sorter Modified files: lib/ts/ts_sorter.h Modified: lib/ts/ts_sorter.h (+18 -1) =================================================================== --- lib/ts/ts_sorter.h 2015-11-24 16:16:49 +0900 (a65564a) +++ lib/ts/ts_sorter.h 2015-11-24 16:17:11 +0900 (55fe868) @@ -21,12 +21,15 @@ #include "../grn.h" +#include "ts_str.h" #include "ts_types.h" #ifdef __cplusplus extern "C" { #endif +/* TODO: Sorting should take into account the order of input records. */ + typedef struct { int REMOVE_ME; } grn_ts_sorter_node; @@ -38,11 +41,25 @@ typedef struct { /* grn_ts_sorter_open() creates a sorter. */ grn_rc grn_ts_sorter_open(grn_ctx *ctx, grn_obj *table, - grn_ts_sorter_node *head, grn_ts_sorter **sorter); + grn_ts_sorter_node *head, grn_ts_int offset, + grn_ts_int limit, grn_ts_sorter **sorter); + +/* grn_ts_sorter_parse() parses a string and creates a sorter. */ +grn_rc grn_ts_sorter_parse(grn_ctx *ctx, grn_obj *table, + grn_ts_str str, grn_ts_int offset, + grn_ts_int limit, grn_ts_sorter **sorter); /* grn_ts_sorter_close() destroys a sorter. */ grn_rc grn_ts_sorter_close(grn_ctx *ctx, grn_ts_sorter *sorter); +/* grn_ts_sorter_progress() progresses sorting. */ +grn_rc grn_ts_sorter_progress(grn_ctx *ctx, grn_ts_sorter *sorter, + grn_ts_record *recs, size_t n_recs); + +/* grn_ts_sorter_complete() completes sorting. */ +grn_rc grn_ts_sorter_complete(grn_ctx *ctx, grn_ts_sorter *sorter, + grn_ts_record *recs, size_t n_recs); + typedef struct { grn_obj *table; } grn_ts_sorter_builder; -------------- next part -------------- HTML����������������������������...ダウンロード