Navigation Menu

Skip to content

Commit

Permalink
Provide grn_table_is_grouped()
Browse files Browse the repository at this point in the history
  • Loading branch information
daijiro committed Jun 18, 2013
1 parent 9c5f474 commit 416234f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/groonga.h
Expand Up @@ -2726,6 +2726,9 @@ GRN_API grn_table_sort_key *grn_table_sort_key_from_str(grn_ctx *ctx,
GRN_API grn_rc grn_table_sort_key_close(grn_ctx *ctx,
grn_table_sort_key *keys, unsigned int nkeys);

GRN_API grn_bool grn_table_is_grouped(grn_obj *table);


GRN_API grn_rc grn_load(grn_ctx *ctx, grn_content_type input_type,
const char *table, unsigned int table_len,
const char *columns, unsigned int columns_len,
Expand Down
9 changes: 9 additions & 0 deletions lib/db.c
Expand Up @@ -8870,6 +8870,15 @@ grn_table_sort_key_close(grn_ctx *ctx, grn_table_sort_key *keys, unsigned int nk
return ctx->rc;
}

grn_bool
grn_table_is_grouped(grn_obj *table)
{
if (GRN_OBJ_TABLEP(table) && GRN_TABLE_IS_GROUPED(table)) {
return GRN_TRUE;
}
return GRN_FALSE;
}

/* grn_load */

static grn_obj *
Expand Down

0 comments on commit 416234f

Please sign in to comment.