Class: ODPI::Dpi::Rowid

Inherits:
Object
  • Object
show all
Defined in:
ext/odpi_ext/rbdpi-rowid.c

Instance Method Summary collapse

Constructor Details

#initializeObject


41
42
43
44
45
# File 'ext/odpi_ext/rbdpi.c', line 41

VALUE rbdpi_initialize_error(VALUE self)
{
    rb_raise(rb_eRuntimeError, "could not initialize by %s::new", rb_obj_classname(self));
    return Qnil;
}

Instance Method Details

#initialize_copy(other) ⇒ Object


58
59
60
61
62
63
64
65
66
67
# File 'ext/odpi_ext/rbdpi-rowid.c', line 58

static VALUE rowid_initialize_copy(VALUE self, VALUE other)
{
    rowid_t *rowid = rbdpi_to_rowid(self);

    *rowid = *rbdpi_to_rowid(other);
    if (rowid->handle != NULL) {
        CHK(dpiRowid_addRef(rowid->handle));
    }
    return self;
}

#to_sObject


69
70
71
72
73
74
75
76
77
# File 'ext/odpi_ext/rbdpi-rowid.c', line 69

static VALUE rowid_to_s(VALUE self)
{
    rowid_t *rowid = rbdpi_to_rowid(self);
    const char *val;
    uint32_t len;

    CHK(dpiRowid_getStringValue(rowid->handle, &val, &len));
    return rb_usascii_str_new(val, len);
}