DBMS_MGWMSG provides object types used by the canonical message types to convert message bodies, and methods, constants, and subprograms for working with Messaging Gateway message types.
This chapter contains the following topics:
See Also:
DBMS_MGWADM which describes the Messaging Gateway administrative interface, DBMS_MGWADM
The EXECUTE privilege is granted to PUBLIC on all types defined in the DBMS_MGWMSG package as well as the canonical types. The DBMS_MGWMSG packages and object types are owned by SYS.
Note:
You must run the catmgw.sql script to load the Messaging Gateway packages and object types into the database. Refer to the Oracle Database Advanced Queuing User's Guide for information on loading database objects and using DBMS_MGWMSG.
The DBMS_MGWMSG package defines constants for specifying various parameter values.
Table 103-1 DBMS_MGWMSG Constants: Value Types and Constants Representing the Type of Value for a SYS.MGW_NAME_VALUE_T Object
| Value | Constant |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table 103-2 DBMS_MGWMSG Constants: Boolean Values—Constants Representing a Boolean as a Numeric Value
| Value | Constant |
|---|---|
|
|
|
|
|
|
Table 103-3 DBMS_MGWMSG Constants: Case Comparisons
| Value | Constant |
|---|---|
|
|
|
|
|
|
Table 103-4 Constants for the TIB/Rendezvous field type
| Value | Constant |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DBMS_MGWMSG uses types to specify certain information.
This type specifies a named value.
The name attribute, type attribute, and one of the <>_value attributes are typically not NULL.
Syntax
TYPE SYS.MGW_NAME_VALUE_T IS OBJECT( name VARCHAR2(250), type INTEGER, integer_value INTEGER, number_value NUMBER, text_value VARCHAR2(4000), raw_value RAW(2000), date_value DATE, -- Methods STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_BOOLEAN ( name IN VARCHAR2, value IN INTEGER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_BYTE ( name IN VARCHAR2, value IN INTEGER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_SHORT ( name IN VARCHAR2, value IN INTEGER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_INTEGER ( name IN VARCHAR2, value IN INTEGER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_LONG ( name IN VARCHAR2, value IN NUMBER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_FLOAT ( name IN VARCHAR2, value IN NUMBER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_DOUBLE ( name IN VARCHAR2, value IN NUMBER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_TEXT ( name IN VARCHAR2, value IN VARCHAR2 ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_RAW ( name IN VARCHAR2, value IN RAW ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_DATE ( name IN VARCHAR2, value IN DATE ) RETURN SYS.MGW_NAME_VALUE_T );
Attributes
Table 103-5 SYS.MGW_NAME_VALUE_T Attributes
| Attribute | Description |
|---|---|
|
|
Name associated with the value |
|
|
Value type. Refer to the |
|
|
Stores a numeric integer value |
|
|
Stores a numeric float or large integer value |
|
|
Stores a text value |
|
|
Stores a |
|
|
Stores a date value |
SYS.MGW_NAME_VALUE_T Type-Attribute Mapping
Table 103-6 shows the mapping between the value type and the attribute used to store the value.
Table 103-6 SYS.MGW_NAME_VALUE_T Type Attribute Mapping
| Type | Value Stored in Attribute |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CONSTRUCT Method
This method constructs a new SYS.MGW_NAME_VALUE_T instance. All attributes are assigned a value of NULL.
Syntax
STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_NAME_VALUE_T;
CONSTRUCT_TYPE Methods
These methods construct a new SYS.MGW_NAME_VALUE_T instance initialized with the value of a specific type. Each method sets the name and type attributes and one of the <>_value attributes, as shown in the mappings in Table 103-6.
Syntax
STATIC FUNCTION CONSTRUCT_<> (
name IN VARCHAR2,
value IN datatype )
RETURN SYS.MGW_NAME_VALUE_T;
Usage Notes
The construct_boolean method sets the value to either DBMS_MGWMSG.BOOLEAN_TRUE or DBMS_MGWMSG.BOOLEAN_FALSE.
This type specifies an array of name-value pairs. An object of SYS.MGW_NAME_VALUE_ARRAY_T type can have up to 1024 elements.
Syntax
TYPE SYS.MGW_NAME_VALUE_ARRAY_T AS VARRAY (1024) OF SYS.MGW_NAME_VALUE_T;
This type specifies a TEXT value. It can store a large value as a CLOB or a smaller value (size <= 4000) as VARCHAR2. Only one of the < >_ value attributes should be set.
Syntax
TYPE SYS.MGW_TEXT_VALUE_T IS OBJECT( small_value VARCHAR2(4000), large_value CLOB, -- Methods STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_TEXT_VALUE_T);
Attributes
Table 103-7 SYS.MGW_TEXT_VALUE_T Attributes
| Attribute | Description |
|---|---|
|
|
Small |
|
|
Large |
CONSTRUCT Method
This method constructs a new SYS.MGW_TEXT_VALUE_T instance. All attributes are assigned a value of NULL.
Syntax
STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_TEXT_VALUE_T;
This type specifies a RAW value. This type can store a large value as a BLOB or a smaller value (size <= 2000) as RAW. You must set no more than one of the < >_value attributes.
Syntax
TYPE SYS.MGW_RAW_VALUE_T IS OBJECT( small_value RAW(2000), large_value BLOB, --Methods STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_RAW_VALUE_T);
Attributes
Table 103-8 SYS.MGW_RAW_VALUE_T Attributes
| Attribute | Description |
|---|---|
|
|
Small |
|
|
Large |
CONSTRUCT Method
This method constructs a new SYS.MGW_RAW_VALUE_T instance. All attributes are assigned a value of NULL.
Syntax
STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_RAW_VALUE_T;
This is a canonical type for a basic TEXT or RAW message. Only a single TEXT or RAW value is typically set. An object of this type must not have both TEXT and RAW set to a not NULL value at the same time.
Syntax
TYPE SYS.MGW_BASIC_MSG_T IS OBJECT( header SYS.MGW_NAME_VALUE_ARRAY_T, text_body SYS.MGW_TEXT_VALUE_T, raw_body SYS.MGW_RAW_VALUE_T, --Methods STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_BASIC_MSG_T);
Attributes
Table 103-9 SYS.MGW_BASIC_MSG_T Attributes
| Attribute | Description |
|---|---|
|
|
Message header information as an array of name-value pairs |
|
|
Message body for a |
|
|
Message body for a |
CONSTRUCT Method
This method constructs a new SYS.MGW_BASIC_MSG_T instance. All attributes are assigned a value of NULL.
Syntax
STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_BASIC_MSG_T;
A type that specifies an array of numbers.
Syntax
TYPE SYS.MGW_NUMBER_ARRAY_T AS VARRAY(1024) OF NUMBER;
This type represents a TIB/Rendezvous message field, typically used in a read-only fashion to retrieve field information from a SYS.MGW_TIBRV_MSG_T instance.
Syntax
TYPE SYS.MGW_TIBRV_FIELD_T IS OBJECT( field_name VARCHAR2(256), field_id INTEGER, field_type INTEGER, number_value NUMBER, number_array_value SYS.MGW_NUMBER_ARRAY_T, text_value VARCHAR2(4000), raw_value RAW(2000), date_value DATE, clob_value CLOB, blob_value BLOB);
Attributes
Table 103-10 SYS.MGW_TIBRV_FIELD_T Attributes
| Attribute | Description |
|---|---|
|
|
Field name. This will be |
|
|
Field identifier. If the field identifier is zero (0), then that field is considered not to have a field identifier. Otherwise the field identifier is a nonzero value that is unique for all fields of that message. |
|
|
Field wire format datatype. The |
|
|
Used to store a numeric value |
|
|
Used to store a numeric array value |
|
|
Used to store a small text value |
|
|
Used to store a small raw value |
|
|
Used to store a date value |
|
|
Used to store a large text value. This is used when the text data will not fit in |
|
|
Used to store a large raw value. This is used when the raw data will not fit in |
SYS.MGW_TIBRV_FIELD_T Type and Attribute Mapping
Table 103-11 describes the mapping in type SYS.MGW_TIBRV_FIELD_T between the field type and attribute used to store the value.
Table 103-11 SYS.MGW_TIBRV_FIELD_T Type and Attribute Mapping
| Field Type (DBMS_MGWMSG constant) | Value Stored in Attribute |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This type represents a TIB/Rendezvous message. You must never directly reference the attributes of this type. Instead use the type methods.
Syntax
TYPE SYS.MGW_TIBRV_MSG_T IS OBJECT(
send_subject VARCHAR2(256),
reply_subject VARCHAR2(256),
cm_time_limit NUMBER,
cm_sender_name VARCHAR2(256),
cm_sequence_num NUMBER,
fields SYS.MGW_TIBRV_IFIELDS_T,
clob_data1 CLOB,
clob_data2 CLOB,
clob_data3 CLOB,
blob_data1 BLOB,
blob_data2 BLOB,
blob_data3 BLOB,
STATIC FUNCTION construct
RETURN SYS.MGW_TIBRV_MSG_T,
MEMBER PROCEDURE add_bool (
name IN VARCHAR2,
id IN INTEGER,
value IN INTEGER ),
MEMBER PROCEDURE add_f32 (
name IN VARCHAR2,
id IN INTEGER,
value IN FLOAT ),
MEMBER PROCEDURE add_f64 (
name IN VARCHAR2,
id IN INTEGER,
value IN DOUBLE ),
MEMBER PROCEDURE add_i8 (
name IN VARCHAR2,
id IN INTEGER,
value IN INTEGER ),
MEMBER PROCEDURE add_i16 (
name IN VARCHAR2,
id IN INTEGER,
value IN INTEGER ),
MEMBER PROCEDURE add_i32 (
name IN VARCHAR2,
id IN INTEGER,
value IN INTEGER ),
MEMBER PROCEDURE add_i64 (
name IN VARCHAR2,
id IN INTEGER,
value IN NUMBER ),
MEMBER PROCEDURE add_ipaddr32 (
name IN VARCHAR2,
id IN INTEGER,
value IN VARCHAR2 ),
MEMBER PROCEDURE add_ipport16 (
name IN VARCHAR2,
id IN INTEGER,
value IN INTEGER ),
MEMBER PROCEDURE add_datetime (
name IN VARCHAR2,
id IN INTEGER,
value IN DATE ),
MEMBER PROCEDURE add_f32array (
name IN VARCHAR2,
id IN INTEGER,
value IN SYS.MGW_NUMBER_ARRAY_T ),
MEMBER PROCEDURE add_f64array (
name IN VARCHAR2,
id IN INTEGER,
value IN SYS.MGW_NUMBER_ARRAY_T ),
MEMBER PROCEDURE add_i8array (
name IN VARCHAR2,
id IN INTEGER,
value IN SYS.MGW_NUMBER_ARRAY_T ),
MEMBER PROCEDURE add_i16array (
name IN VARCHAR2,
id IN INTEGER,
value IN SYS.MGW_NUMBER_ARRAY_T ),
MEMBER PROCEDURE add_i32array (
name IN VARCHAR2,
id IN INTEGER,
value IN SYS.MGW_NUMBER_ARRAY_T ),
MEMBER PROCEDURE add_i64array (
name IN VARCHAR2,
id IN INTEGER,
value IN SYS.MGW_NUMBER_ARRAY_T ),
MEMBER PROCEDURE add_string (
name IN VARCHAR2,
id IN INTEGER,
value IN VARCHAR2 ),
MEMBER PROCEDURE add_string (
name IN VARCHAR2,
id IN INTEGER,
value IN CLOB ),
MEMBER PROCEDURE add_opaque (
name IN VARCHAR2,
id IN INTEGER,
value IN RAW ),
MEMBER PROCEDURE add_opaque (
name IN VARCHAR2,
id IN INTEGER,
value IN BLOB ),
MEMBER PROCEDURE add_xml (
name IN VARCHAR2,
id IN INTEGER,
value IN RAW ),
MEMBER PROCEDURE add_xml (
name IN VARCHAR2,
id IN INTEGER,
value IN BLOB ),
MEMBER PROCEDURE set_send_subject (
value IN VARCHAR2 ),
MEMBER PROCEDURE set_reply_subject (
value IN VARCHAR2 ),
MEMBER PROCEDURE set_cm_time_limit (
value IN NUMBER ),
MEMBER PROCEDURE set_cm_sender_name (
value IN VARCHAR2 ),
MEMBER PROCEDURE set_cm_sequence_num (
value IN NUMBER ),
MEMBER FUNCTION get_send_subject
RETURN VARCHAR2,
MEMBER FUNCTION get_reply_subject
RETURN VARCHAR2,
MEMBER FUNCTION get_cm_time_limit
RETURN NUMBER,
MEMBER FUNCTION get_cm_sender_name
RETURN VARCHAR2,
MEMBER FUNCTION get_cm_sequence_num
RETURN NUMBER,
MEMBER FUNCTION get_field_count
RETURN INTEGER,
MEMBER FUNCTION get_field (
idx IN INTEGER )
RETURN SYS.MGW_TIBRV_FIELD_T,
MEMBER FUNCTION get_field_by_name (
name IN VARCHAR2 )
RETURN SYS.MGW_TIBRV_FIELD_T,
MEMBER FUNCTION get_field_by_id (
id IN INTEGER )
RETURN SYS.MGW_TIBRV_FIELD_T,
MEMBER FUNCTION find_field_name (
name IN VARCHAR2,
start_idx IN INTEGER )
RETURN INTEGER,
MEMBER FUNCTION find_field_id (
id IN INTEGER,
start_idx IN INTEGER )
RETURN INTEGER
);
Attributes
Table 103-12 SYS.MGW_TIBRV_MSG_T Type Attributes
| Attribute | Description |
|---|---|
|
|
Send subject name |
|
|
Reply subject name |
|
|
Time limit for a certified message |
|
|
Sender name of a certified message |
|
|
Sequence number of a certified message |
|
|
Collection of message fields |
|
|
Used to store a large text value |
|
|
Used to store a large text value |
|
|
Used to store a large text value |
|
|
Used to store a large raw value |
|
|
Used to store a large raw value |
|
|
Used to store a large raw value |
Construct Method
Constructs a new SYS.MGW_TIBRV_MSG_T instance. All attributes are set to NULL.
Syntax
STATIC FUNCTION construct RETURN SYS.MGW_TIBRV_MSG_T;
ADD_<> Methods
Adds a new field to the message.
Syntax
MEMBER PROCEDURE ADD_<> (
name IN VARCHAR2,
id IN INTEGER,
value IN datatype );
Parameters
Table 103-13 SYS.MGW_TIBRV_MSG_T ADD_<> Method Parameters
| Parameter | Description |
|---|---|
|
|
Field name |
|
|
Field identifier |
|
|
Field data |
Table 103-14 shows, for each add method, the field type that will be assigned and valid values for the field data.
Table 103-14 MGW_TIBRV_MSG_T Add Method Field Types
| Method Name | Field Type Assigned | Comment |
|---|---|---|
|
|
|
Valid values: 0 (false), 1 (true) |
|
|
|
n/a |
|
|
|
n/a |
|
|
|
Valid range: -128...127 |
|
|
|
Valid range: -32768...32767 |
|
|
|
Valid range: -2147483648... 2147483647 |
|
|
|
n/a |
|
|
|
n/a |
|
|
|
n/a |
|
|
|
n/a |
|
|
|
n/a |
|
|
|
n/a |
|
|
|
Valid range: -128...127 |
|
|
|
Valid range: -32768...32767 |
|
|
|
Valid range: -2147483648... 2147483647 |
|
|
|
n/a |
|
|
|
Value stored as |
|
|
|
Value stored as |
|
|
|
Value stored as |
SET_<> Methods
Accessor methods to set an instance attribute to a specific value.
Syntax
MEMBER PROCEDURE SET_<> (
value IN datatype );
Parameters
Table 103-15 SYS.MGW_TIBRV_MSG_T SET_<> Method Parameters
| Parameter | Description |
|---|---|
|
|
Value to be assigned |
GET_<> Methods
Accessor methods to retrieve the value for an instance attribute.
Syntax
MEMBER PROCEDURE GET_<>
RETURN datatype;
Parameters
None
Return Values
Returns the attribute value.
GET_FIELD_COUNT Function
Gets the number of message fields.
Syntax
MEMBER PROCEDURE get_field_count RETURN INTEGER;
Parameters
None
Return Values
Returns the number of fields, or zero (0) if there are none.
GET_FIELD Function
Retrieves field information for the field having a given field collection index. This method should only be called if the GET_FIELD_COUNT Function returns a nonzero value and idx must specify a valid collection index; that is, 1<=idx<=get_field_count().
Syntax
MEMBER PROCEDURE get_field (
idx IN INTEGER )
RETURN SYS.MGW_TIBRV_FIELD_T;
Parameters
Table 103-16 SYS.MGW_TIBRV_MSG_T GET_FIELD Function Parameters
| Parameter | Description |
|---|---|
|
|
Specifies the 1-based field collection index of the field to retrieve |
Note:
A 1-based index begins at one (1) instead of zero (0).
Return Values
Returns the field information.
GET_FIELD_BY_NAME Function
Retrieves field information for the first field that has a given field name. The name comparison is case-sensitive.
Syntax
MEMBER PROCEDURE get_field_by_name ( name IN VARCHAR2 ) RETURN SYS.MGW_TIBRV_FIELD_T;
Parameters
Table 103-17 SYS.MGW_TIBRV_MSG_T GET_FIELD_BY_NAME Function Parameters
| Parameter | Description |
|---|---|
|
|
Specifies the field name to search for. This can be |
Return Values
Returns the field information, or NULL if no match was found.
GET_FIELD_BY_ID Function
Retrieves field information for the first field that has a given field identifier.
A field can have either a unique identifier or no identifier. If the field identifier value is zero (0) or NULL, then the field is considered to have no identifier. Otherwise, the identifier is a nonzero value that is unique for all the fields of this message.
Syntax
MEMBER PROCEDURE get_field_by_id ( id IN INTEGER ) RETURN SYS.MGW_TIBRV_FIELD_T;
Parameters
Table 103-18 SYS.MGW_TIBRV_MSG_T GET_FIELD_BY_ID Function Parameters
| Parameter | Description |
|---|---|
|
|
Specifies the field identifier to search for. This can be zero (0) or |
Return Values
Returns the field information, or NULL if no match was found.
FIND_FIELD_NAME Function
Searches for a field with a given field name, starting from a given index of the field collection. It returns the index of that field. The name comparison is case-sensitive. This function is useful for finding all the fields that have the same name.
Syntax
MEMBER PROCEDURE find_field_name ( name IN VARCHAR2, start_idx IN INTEGER ) RETURN INTEGER;
Parameters
Table 103-19 SYS.MGW_TIBRV_MSG_T FIND_FIELD_NAME Function Parameters
| Parameter | Description |
|---|---|
|
|
Specifies the field name to search for. This can be |
|
|
Specifies the 1-based field collection index from which the search should start. |
Return Values
Returns the field index (> 0) if a match was found, or zero (0) if no match was found.
FIND_FIELD_ID Function
Searches for a field with a given field identifier, starting from a given index of the field collection. It returns the index of that field.
Syntax
MEMBER PROCEDURE find_field_id (
id IN INTEGER,
start_idx IN INTEGER )
RETURN INTEGER;
Parameters
Table 103-20 SYS.MGW_TIBRV_MSG_T FIND_FIELD_ID Function Parameters
| Parameter | Description |
|---|---|
|
|
Specifies the field identifier to search for. This can be zero (0) or |
|
|
Specifies the 1-based field collection index from which the search should start. |
Return Values
Returns the field index (> 0) if a match was found, or zero (0) if no match was found.
This table lists the DDBMS_MGWMSG subprograms and briefly describes them.
Table 103-21 DBMS_MGWMSG Package Subprograms
| Subprogram | Description |
|---|---|
|
Converts a |
|
|
Appends a name-value element to the end of a name-value array |
|
|
Searches a name-value array for the element with the name you specify in |
|
|
Searches a name-value array for an element with the name and value type you specify |
|
|
Gets the name-value element of the name you specify in |
|
|
Gets the value of the name-value array element that you specify in |
|
|
Gets the value of the name-value array element that you specify in |
|
|
Gets the value of the name-value array element that you specify in |
|
|
Gets the value of the name-value array element that you specify in |
|
|
Gets the value of the name-value array element that you specify in |
|
|
Gets the value of the name-value array element that you specify in |
|
|
Gets the value of the name-value array element that you specify in |
|
|
Gets the value of the name-value array element that you specify in |
|
|
Gets the value of the name-value array element that you specify in |
|
|
Gets the value of the name-value array element that you specify in |
|
|
Converts a |
This function converts a SYS.ANYDATA object encapsulating a row LCR (Logical Change Record, in this case a LCR$_ROW_RECORD) or a DDL LCR (LCR$_DDL_RECORD) to a SYS.XMLTYPE object.
See Also:
Syntax
DBMS_MGWMSG.LCR_TO_XML ( p_anydata IN SYS.ANYDATA ) RETURN SYS.XMLTYPE;
Parameters
Table 103-22 LCR_TO_XML Function Parameters
| Parameter | Description |
|---|---|
|
|
An |
Return Values
Returns a SYS.XMLTYPE object.
Usage Notes
An exception is raised if the encapsulated type p_anydata is not an LCR.
This procedure appends a name-value element to the end of a name-value array.
Syntax
DBMS_MGWMSG.NVARRAY_ADD ( p_array IN OUT SYS.MGW_NAME_VALUE_ARRAY_T, p_value IN SYS.MGW_NAME_VALUE_T );
Parameters
Table 103-23 NVARRAY_ADD Procedure Parameters
| Parameter | Description |
|---|---|
|
|
On input, the name-value array instance to modify. If |
|
|
The value to add. If |
This function searches a name-value array for the element with the name you specify in p_name.
Syntax
DBMS_MGWMSG.NVARRAY_FIND_NAME ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN BINARY_INTEGER;
Parameters
Table 103-24 NVARRAY_FIND_NAME Function Parameters
| Parameters | Description |
|---|---|
|
|
The name-value array to search |
|
|
The name to find |
|
|
Name comparison method. Values are |
Return Values
Returns a positive integer that is the array index of the matching element or zero (0) if the specified name is not found.
This function searches a name-value array for an element with the name and value type you specify.
Syntax
DBMS_MGWMSG.NVARRAY_FIND_NAME_TYPE ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_type IN BINARY_INTEGER p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN BINARY_INTEGER;
Parameters
Table 103-25 NVARRAY_FIND_NAME_TYPE Function Parameters
| Parameter | Description |
|---|---|
|
|
The name-value array to search |
|
|
The name to find |
|
|
The value type. Refer to the value type constants in Table 103-1 . |
|
|
Name comparison method. Values are |
Return Values
Returns a positive integer that is the array index of the matching element, zero (0) if the specified name is not found, or negative one (-1) if the specified name is found but a type mismatch exists.
This function gets the name-value element of the name you specify in p_name from a name-value array.
Syntax
DBMS_MGWMSG.NVARRAY_GET ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN SYS.MGW_NAME_VALUE_T;
Parameters
Table 103-26 NVARRAY_GET Function Parameters
| Parameter | Description |
|---|---|
|
|
The name-value array |
|
|
The value name |
|
|
Name comparison method. Values are |
Return Values
Returns the matching element, or NULL if the specified name is not found.
This function gets the value of the name-value array element that you specify in p_name and with the BOOLEAN_VALUE value type.
Syntax
DBMS_MGWMSG.NVARRAY_GET_BOOLEAN ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN INTEGER;
Parameters
Table 103-27 NVARRAY_GET_BOOLEAN Function Parameters
| Parameter | Description |
|---|---|
|
|
The name-value array |
|
|
The value name |
|
|
Name comparison method. Values are |
Return Values
Returns the value, or NULL if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the BYTE_VALUE value type.
Syntax
DBMS_MGWMSG.NVARRAY_GET_BYTE ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN INTEGER;
Parameters
Table 103-28 NVARRAY_GET_BYTE Function Parameters
| Parameter | Description |
|---|---|
|
|
The name-value array |
|
|
The value name |
|
|
Name comparison method. Values are |
Return Values
Returns the value, or NULL if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the DATE_VALUE value type.
Syntax
DBMS_MGWMSG.NVARRAY_GET_DATE ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN DATE;
Parameters
Table 103-29 NVARRAY_GET_DATE Function Parameters
| Parameters | Description |
|---|---|
|
|
The name-value array |
|
|
The value name |
|
|
Name comparison method. Values are |
Return Values
Returns the value, or NULL if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the DOUBLE_VALUE value type.
Syntax
DBMS_MGWMSG.NVARRAY_GET_DOUBLE ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN NUMBER;
Parameters
Table 103-30 NVARRAY_GET_DOUBLE Function Parameters
| Parameter | Description |
|---|---|
|
|
The name-value array |
|
|
The value name |
|
|
Name comparison method. Values are |
Return Values
Returns the value, or NULL if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the FLOAT_VALUE value type.
Syntax
DBMS_MGWMSG.NVARRAY_GET_FLOAT ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN NUMBER;
Parameters
Table 103-31 NVARRAY_GET_FLOAT Function Parameters
| Parameter | Description |
|---|---|
|
|
The name-value array |
|
|
The value name |
|
|
Name comparison method. Values are |
Return Values
Returns the value, or NULL if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the INTEGER_VALUE value type.
Syntax
DBMS_MGWMSG.NVARRAY_GET_INTEGER ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN INTEGER;
Parameters
Table 103-32 NVARRAY_GET_INTEGER Function Parameters
| Parameter | Description |
|---|---|
|
|
The name-value array |
|
|
The value name |
|
|
Name comparison method. Values are |
Return Values
Returns the value, or NULL if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the LONG_VALUE value type.
Syntax
DBMS_MGWMSG.NVARRAY_GET_LONG ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN NUMBER;
Parameters
Table 103-33 NVARRAY_GET_LONG Function Parameters
| Parameter | Description |
|---|---|
|
|
The name-value array |
|
|
The value name |
|
|
Name comparison method. Values are |
Return Values
Returns the value, or NULL if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the RAW_VALUE value type.
Syntax
DBMS_MGWMSG.NVARRAY_GET_RAW ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN RAW;
Parameters
Table 103-34 NVARRAY_GET_RAW Function Parameters
| Parameter | Description |
|---|---|
|
|
The name-value array |
|
|
The value name |
|
|
Name comparison method. Values are |
Return Values
Returns the value, or NULL if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the SHORT_VALUE value type.
Syntax
DBMS_MGWMSG.NVARRAY_GET_SHORT ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN INTEGER;
Parameters
Table 103-35 NVARRAY_GET_SHORT Function Parameters
| Parameter | Description |
|---|---|
|
|
The name-value array |
|
|
The value name |
|
|
Name comparison method. Values are |
Return Values
Returns the value, or NULL if either the specified name is not found or a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the TEXT_VALUE value type.
Syntax
DBMS_MGWMSG.NVARRAY_GET_TEXT ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN VARCHAR2;
Parameters
Table 103-36 NVARRAY_GET_TEXT Function Parameters
| Parameter | Description |
|---|---|
|
|
The name-value array |
|
|
The value name |
|
|
Name comparison method. Values are |
Return Values
Returns the value, or NULL if either the specified name is not found or a type mismatch exists.
This function converts a SYS.XMLTYPE object to a SYS.ANYDATA object encapsulating a row LCR (LCR$_ROW_RECORD) or a DDL LCR (LCR$_DDL_RECORD).
See Also:
Syntax
DBMS_MGWMSG.XML_TO_LCR ( p_xmldata IN SYS.XMLTYPE ) RETURN SYS.ANYDATA;
Parameters
Table 103-37 XML_TO_LCR Function Parameters
| Parameter | Description |
|---|---|
|
|
An |
Return Values
Returns a SYS.ANYDATA object.
Usage Notes
An exception is raised if p_xmldata cannot be converted to an LCR.