Class: ODPI::Dpi::EnqOptions

Inherits:
Object
  • Object
show all
Defined in:
ext/odpi_ext/rbdpi-enq-options.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

#delivery_mode=(val) ⇒ Object


88
89
90
91
92
93
94
# File 'ext/odpi_ext/rbdpi-enq-options.c', line 88

static VALUE enq_options_set_delivery_mode(VALUE self, VALUE val)
{
    enq_options_t *options = rbdpi_to_enq_options(self);

    CHK(dpiEnqOptions_setDeliveryMode(options->handle, rbdpi_to_dpiMessageDeliveryMode(val)));
    return val;
}

#initialize_copy(other) ⇒ Object


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

static VALUE enq_options_initialize_copy(VALUE self, VALUE other)
{
    enq_options_t *enq_options = rbdpi_to_enq_options(self);

    *enq_options = *rbdpi_to_enq_options(other);
    if (enq_options->handle != NULL) {
        CHK(dpiEnqOptions_addRef(enq_options->handle));
    }
    return self;
}

#transformationObject


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

static VALUE enq_options_get_transformation(VALUE self)
{
    enq_options_t *options = rbdpi_to_enq_options(self);
    const char *val;
    uint32_t len;

    CHK(dpiEnqOptions_getTransformation(options->handle, &val, &len));
    return rb_external_str_new_with_enc(val, len, options->enc);
}

#transformation=(val) ⇒ Object


96
97
98
99
100
101
102
103
# File 'ext/odpi_ext/rbdpi-enq-options.c', line 96

static VALUE enq_options_set_transformation(VALUE self, VALUE val)
{
    enq_options_t *options = rbdpi_to_enq_options(self);

    CHK_STR_ENC(val, options->enc);
    CHK(dpiEnqOptions_setTransformation(options->handle, RSTRING_PTR(val), RSTRING_LEN(val)));
    return val;
}

#visibilityObject


79
80
81
82
83
84
85
86
# File 'ext/odpi_ext/rbdpi-enq-options.c', line 79

static VALUE enq_options_get_visibility(VALUE self)
{
    enq_options_t *options = rbdpi_to_enq_options(self);
    dpiVisibility val;

    CHK(dpiEnqOptions_getVisibility(options->handle, &val));
    return rbdpi_from_dpiVisibility(val);
}

#visibility=(val) ⇒ Object


105
106
107
108
109
110
111
# File 'ext/odpi_ext/rbdpi-enq-options.c', line 105

static VALUE enq_options_set_visibility(VALUE self, VALUE val)
{
    enq_options_t *options = rbdpi_to_enq_options(self);

    CHK(dpiEnqOptions_setVisibility(options->handle, rbdpi_to_dpiVisibility(val)));
    return val;
}