Skip to content

Commit ad7ee6e

Browse files
committed
define grn_hash_cursor_open_by_key to sort grn_hash by key
1 parent 5fce3a3 commit ad7ee6e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/hash.c

+11
Original file line numberDiff line numberDiff line change
@@ -4350,6 +4350,17 @@ grn_hash_cursor_open(grn_ctx *ctx, grn_hash *hash,
43504350
return NULL;
43514351
}
43524352
if (!(c = GRN_CALLOC(sizeof(grn_hash_cursor)))) { return NULL; }
4353+
if ((flags & GRN_CURSOR_BY_KEY)) {
4354+
return grn_hash_cursor_open_by_key(ctx
4355+
hash,
4356+
min,
4357+
min_size,
4358+
max,
4359+
max_size,
4360+
offset,
4361+
limit,
4362+
flags);
4363+
}
43534364
GRN_DB_OBJ_SET_TYPE(c, GRN_CURSOR_TABLE_HASH_KEY);
43544365
c->hash = hash;
43554366
c->ctx = ctx;

0 commit comments

Comments
 (0)