Class: Groonga::Accessor

Inherits:
Object
  • Object
show all
Defined in:
ext/groonga/rb-grn-accessor.c,
ext/groonga/rb-grn-accessor.c

Overview

キー、値、スコアなど種々の値へのアクセスをカプセル化した オブジェクト。 Table#column で取得できる。

Instance Method Summary collapse

Methods inherited from Object

#==, #[], #[]=, #accessor?, #append, #builtin?, #close, #closed?, #column?, #dirty?, #domain, #function_procedure?, #id, #index_column?, #inspect, #key_accessor?, #last_modified, #name, #path, #persistent?, #prepend, #procedure?, #range, #reference_column?, #remove, #scorer_procedure?, #selector_only_procedure?, #selector_procedure?, #table?, #temporary?, #touch, #unlink, #window_function_procedure?

Instance Method Details

#local_nameObject

アクセサ名を返す。

Examples:

items = Groonga::Array.create(:name => "Items")
id = items.column("_id")
id.name # => nil
id.local_name # => "_id"


88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'ext/groonga/rb-grn-accessor.c', line 88

static VALUE
rb_grn_accessor_get_local_name (VALUE self)
{
    RbGrnAccessor *rb_grn_accessor;
    RbGrnNamedObject *rb_grn_named_object;

    rb_grn_accessor = SELF(self);
    rb_grn_named_object = RB_GRN_NAMED_OBJECT(rb_grn_accessor);
    if (rb_grn_named_object->name_size == 0)
        return Qnil;

    return rb_str_new(rb_grn_named_object->name,
                      rb_grn_named_object->name_size);
}