Skip to content

Commit 1be2a4b

Browse files
committed
define struct to put sorted hash entries
1 parent 41477a2 commit 1be2a4b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

lib/grn_hash.h

+17
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,22 @@ struct _grn_hash_header_large {
299299
grn_id garbages[GRN_HASH_MAX_KEY_SIZE_LARGE];
300300
};
301301

302+
struct _grn_hash_cursor_sorted_entry {
303+
char *key;
304+
uint32_t key_size;
305+
grn_id rid;
306+
};
307+
308+
typedef struct _grn_hash_cursor_sorted_entry grn_hash_cursor_sorted_entry;
309+
310+
struct _grn_hash_cursor_sorted_entires {
311+
grn_hash_cursor_sorted_entry *sorted_entries;
312+
uint32_t n_entries;
313+
uint32_t curr_idx;
314+
};
315+
316+
typedef struct _grn_hash_cursor_sorted_entires grn_hash_cursor_sorted_entires;
317+
302318
struct _grn_hash_cursor {
303319
grn_db_obj obj;
304320
grn_hash *hash;
@@ -307,6 +323,7 @@ struct _grn_hash_cursor {
307323
grn_id tail;
308324
unsigned int rest;
309325
int dir;
326+
grn_hash_cursor_sorted_entires *sorted_entries;
310327
};
311328

312329
/* deprecated */

0 commit comments

Comments
 (0)