Class: OracleDB::MsgProps
- Inherits:
-
Object
- Object
- OracleDB::MsgProps
- Defined in:
- ext/oracledb/rboradb_aq.c
Instance Method Summary collapse
- #correlation ⇒ Object
- #correlation=(obj) ⇒ Object
- #delay ⇒ Object
- #delay=(obj) ⇒ Object
- #delivery_mode ⇒ Object
- #enq_time ⇒ Object
- #exception_q ⇒ Object
- #exception_q=(obj) ⇒ Object
- #expiration ⇒ Object
- #expiration=(obj) ⇒ Object
- #initialize(conn) ⇒ Object constructor
- #msg_id ⇒ Object
- #num_attempts ⇒ Object
- #original_msg_id ⇒ Object
- #original_msg_id=(obj) ⇒ Object
- #payload ⇒ Object
- #payload=(obj) ⇒ Object
- #priority ⇒ Object
- #priority=(obj) ⇒ Object
- #state ⇒ Object
Constructor Details
#initialize(conn) ⇒ Object
266 267 268 269 270 271 272 273 274 275 276 |
# File 'ext/oracledb/rboradb_aq.c', line 266
static VALUE msg_props_initialize(VALUE self, VALUE conn)
{
MsgProps_t *props = To_MsgProps(self);
rbOraDBConn *dconn = rboradb_get_dconn(conn);
RBORADB_INIT(props, dconn);
if (dpiConn_newMsgProps(dconn->handle, &props->handle) != DPI_SUCCESS) {
rboradb_raise_error(dconn->ctxt);
}
return Qnil;
}
|
Instance Method Details
#correlation ⇒ Object
283 284 285 286 |
# File 'ext/oracledb/rboradb_aq.c', line 283
static VALUE msgprops_correlation(VALUE self)
{
GET_STR(MsgProps, Correlation);
}
|
#correlation=(obj) ⇒ Object
288 289 290 291 |
# File 'ext/oracledb/rboradb_aq.c', line 288
static VALUE msgprops_set_correlation(VALUE self, VALUE obj)
{
SET_STR(MsgProps, Correlation);
}
|
#delay ⇒ Object
293 294 295 296 |
# File 'ext/oracledb/rboradb_aq.c', line 293
static VALUE msgprops_delay(VALUE self)
{
GET_INT32(MsgProps, Delay);
}
|
#delay=(obj) ⇒ Object
298 299 300 301 |
# File 'ext/oracledb/rboradb_aq.c', line 298
static VALUE msgprops_set_delay(VALUE self, VALUE obj)
{
SET_INT32(MsgProps, Delay);
}
|
#delivery_mode ⇒ Object
303 304 305 306 |
# File 'ext/oracledb/rboradb_aq.c', line 303
static VALUE msgprops_delivery_mode(VALUE self)
{
GET_ENUM(MsgProps, DeliveryMode, dpiMessageDeliveryMode);
}
|
#enq_time ⇒ Object
308 309 310 311 |
# File 'ext/oracledb/rboradb_aq.c', line 308
static VALUE msgprops_enq_time(VALUE self)
{
GET_STRUCT(MsgProps, EnqTime, dpiTimestamp);
}
|
#exception_q ⇒ Object
313 314 315 316 |
# File 'ext/oracledb/rboradb_aq.c', line 313
static VALUE msgprops_exception_q(VALUE self)
{
GET_STR(MsgProps, ExceptionQ);
}
|
#exception_q=(obj) ⇒ Object
318 319 320 321 |
# File 'ext/oracledb/rboradb_aq.c', line 318
static VALUE msgprops_set_exception_q(VALUE self, VALUE obj)
{
SET_STR(MsgProps, ExceptionQ);
}
|
#expiration ⇒ Object
323 324 325 326 |
# File 'ext/oracledb/rboradb_aq.c', line 323
static VALUE msgprops_expiration(VALUE self)
{
GET_INT32(MsgProps, Expiration);
}
|
#expiration=(obj) ⇒ Object
328 329 330 331 |
# File 'ext/oracledb/rboradb_aq.c', line 328
static VALUE msgprops_set_expiration(VALUE self, VALUE obj)
{
SET_INT32(MsgProps, Expiration);
}
|
#msg_id ⇒ Object
333 334 335 336 |
# File 'ext/oracledb/rboradb_aq.c', line 333
static VALUE msgprops_msg_id(VALUE self)
{
GET_STR(MsgProps, MsgId);
}
|
#num_attempts ⇒ Object
278 279 280 281 |
# File 'ext/oracledb/rboradb_aq.c', line 278
static VALUE msgprops_num_attempts(VALUE self)
{
GET_INT32(MsgProps, NumAttempts);
}
|
#original_msg_id ⇒ Object
338 339 340 341 |
# File 'ext/oracledb/rboradb_aq.c', line 338
static VALUE msgprops_original_msg_id(VALUE self)
{
GET_STR(MsgProps, OriginalMsgId);
}
|
#original_msg_id=(obj) ⇒ Object
343 344 345 346 |
# File 'ext/oracledb/rboradb_aq.c', line 343
static VALUE msgprops_set_original_msg_id(VALUE self, VALUE obj)
{
SET_STR(MsgProps, OriginalMsgId);
}
|
#payload ⇒ Object
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'ext/oracledb/rboradb_aq.c', line 348
static VALUE msgprops_payload(VALUE self)
{
MsgProps_t *props = To_MsgProps(self);
if (props->payload_objtype) {
dpiObject *obj;
if (dpiMsgProps_getPayload(props->handle, &obj, NULL, NULL) != DPI_SUCCESS) {
RBORADB_RAISE_ERROR(props);
}
return obj ? rboradb_from_dpiObject(obj, props->payload_objtype, props->dconn, 1) : Qnil;
} else {
const char *val;
uint32_t len;
if (dpiMsgProps_getPayload(props->handle, NULL, &val, &len) != DPI_SUCCESS) {
RBORADB_RAISE_ERROR(props);
}
return val ? rb_str_new(val, len) : Qnil;
}
}
|
#payload=(obj) ⇒ Object
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
# File 'ext/oracledb/rboradb_aq.c', line 370
static VALUE msgprops_set_payload(VALUE self, VALUE obj)
{
MsgProps_t *props = To_MsgProps(self);
dpiObjectType *objtype = rboradb_get_ObjectType_or_null(obj);
if (objtype) {
if (dpiMsgProps_setPayloadObject(props->handle, rboradb_to_dpiObject(obj)) != DPI_SUCCESS) {
RBORADB_RAISE_ERROR(props);
}
} else {
rb_string_value(&obj);
if (dpiMsgProps_setPayloadBytes(props->handle, RSTRING_PTR(obj), RSTRING_LEN(obj)) != DPI_SUCCESS) {
RBORADB_RAISE_ERROR(props);
}
}
if (props->payload_objtype) {
dpiObjectType_release(props->payload_objtype);
}
props->payload_objtype = objtype;
if (props->payload_objtype) {
dpiObjectType_addRef(props->payload_objtype);
}
return Qnil;
}
|
#priority ⇒ Object
395 396 397 398 |
# File 'ext/oracledb/rboradb_aq.c', line 395
static VALUE msgprops_priority(VALUE self)
{
GET_INT32(MsgProps, Priority);
}
|
#priority=(obj) ⇒ Object
400 401 402 403 |
# File 'ext/oracledb/rboradb_aq.c', line 400
static VALUE msgprops_set_priority(VALUE self, VALUE obj)
{
SET_INT32(MsgProps, Priority);
}
|
#state ⇒ Object
405 406 407 408 |
# File 'ext/oracledb/rboradb_aq.c', line 405
static VALUE msgprops_state(VALUE self)
{
GET_ENUM(MsgProps, State, dpiMessageState);
}
|