Navigation Menu

Skip to content

Commit

Permalink
Add a new predicate: grn_obj_is_number_family_bulk()
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jun 12, 2018
1 parent f1af2da commit bcfee51
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/groonga/obj.h
Expand Up @@ -35,6 +35,7 @@ GRN_API grn_bool grn_obj_is_true(grn_ctx *ctx, grn_obj *obj);
GRN_API grn_bool grn_obj_is_builtin(grn_ctx *ctx, grn_obj *obj);
GRN_API grn_bool grn_obj_is_bulk(grn_ctx *ctx, grn_obj *obj);
GRN_API grn_bool grn_obj_is_text_family_bulk(grn_ctx *ctx, grn_obj *obj);
GRN_API grn_bool grn_obj_is_number_family_bulk(grn_ctx *ctx, grn_obj *obj);
GRN_API grn_bool grn_obj_is_table(grn_ctx *ctx, grn_obj *obj);
GRN_API grn_bool grn_obj_is_lexicon(grn_ctx *ctx, grn_obj *obj);
GRN_API grn_bool grn_obj_is_column(grn_ctx *ctx, grn_obj *obj);
Expand Down
10 changes: 10 additions & 0 deletions lib/obj.c
Expand Up @@ -99,6 +99,16 @@ grn_obj_is_text_family_bulk(grn_ctx *ctx, grn_obj *obj)
return GRN_TYPE_IS_TEXT_FAMILY(obj->header.domain);
}

grn_bool
grn_obj_is_number_family_bulk(grn_ctx *ctx, grn_obj *obj)
{
if (!grn_obj_is_bulk(ctx, obj)) {
return GRN_FALSE;
}

return grn_type_id_is_number_family(ctx, obj->header.domain);
}

grn_bool
grn_obj_is_table(grn_ctx *ctx, grn_obj *obj)
{
Expand Down

0 comments on commit bcfee51

Please sign in to comment.