Module: Groonga::ID

Defined in:
ext/groonga/rb-grn-id.c

Constant Summary collapse

NIL =
INT2NUM(GRN_ID_NIL)
MAX =
INT2NUM(GRN_ID_MAX)

Class Method Summary collapse

Class Method Details

.builtin?(id) ⇒ Boolean

Returns true if the id is builtin, false otherwise.

Parameters:

  • id (Integer)

    The ID to be confirmed.

Returns:

  • (Boolean)

    true if the id is builtin, false otherwise.

Since:

  • 6.0.5



34
35
36
37
38
39
40
41
42
43
# File 'ext/groonga/rb-grn-id.c', line 34

static VALUE
rb_grn_id_s_builtin_p (VALUE self, VALUE rb_id)
{
    grn_ctx *ctx = NULL;
    grn_id id;

    id = NUM2INT(rb_id);

    return CBOOL2RVAL(grn_id_is_builtin(ctx, id));
}

.builtin_type?(id) ⇒ Boolean

Returns true if the id is builtin_type, false otherwise.

Parameters:

  • id (Integer)

    The ID to be confirmed.

Returns:

  • (Boolean)

    true if the id is builtin_type, false otherwise.

Since:

  • 6.0.9



52
53
54
55
56
57
58
59
60
61
# File 'ext/groonga/rb-grn-id.c', line 52

static VALUE
rb_grn_id_s_builtin_type_p (VALUE self, VALUE rb_id)
{
    grn_ctx *ctx = NULL;
    grn_id id;

    id = NUM2INT(rb_id);

    return CBOOL2RVAL(grn_id_is_builtin_type(ctx, id));
}