Skip Headers
Oracle® Database PL/SQL Packages and Types Reference
11g Release 1 (11.1)

Part Number B28419-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

138 DBMS_TRANSFORM

The DBMS_TRANSFORM package provides an interface to the message format transformation features of Oracle Advanced Queuing.

See Also:

Oracle Streams Advanced Queuing User's Guide for more on message format transformations.

This chapter contains the following topic:


Summary of DBMS_TRANSFORM Subprograms

Table 138-1 DBMS_TRANSFORM Package Subprograms

Subprograms Description
CREATE_TRANSFORMATION Procedure
Creates a transformation that maps an object of the source type to an object of the destination type
DROP_TRANSFORMATION Procedure
Drops the given transformation
MODIFY_TRANSFORMATION Procedure
Modifies an existing transformation


CREATE_TRANSFORMATION Procedure

This procedure creates a transformation that maps an object of the source type to an object of the target type. The transformation expression can be a SQL expression or a PL/SQL function. It must return an object of the target type.

Syntax

DBMS_TRANSFORM.CREATE_TRANSFORMATION (
    schema               VARCHAR2(30),
    name                 VARCHAR2(30),
    from_schema          VARCHAR2(30),
    from_type            VARCHAR2(30),
    to_schema            VARCHAR2(30),
    to_type              VARCHAR2(30),
    transformation       VARCHAR2(4000)); 

Parameters

Table 138-2 CREATE_TRANSFORMATION Procedure Parameters

Parameter Description
schema Specifies the schema of the transformation.
name Specifies the name of the transformation.
from_schema Specifies the schema of the source type.
from_type Specifies the source type.
to_schema Specifies the target type schema.
to_type Specifies the target type.
transformation Specifies the transformation expression, returning an object of the target type. The expression must be a function returning an object of the target type or a constructor expression for the target type. You can choose not to specify a transformation expression and instead specify transformations for attributes of the target type using MODIFY_TRANSFORMATION.

Usage Notes

For using the transformation at enqueue and dequeue time, the login user invoking the operation must have execute privileges on the PLSQL functions used by the transformation. For propagation, the owning schema of the queue must have these privileges.


DROP_TRANSFORMATION Procedure

This procedure drops the given transformation.

Syntax

DBMS_TRANSFORM.DROP_TRANSFORMATION (

schema VARCHAR2(30),

name        VARCHAR2(30));

Parameters

Table 138-3 DROP_TRANSFORMATION Procedure Parameters

Parameter Description
schema Specifies the schema of the transformation.
name Specifies the name of the transformation.


MODIFY_TRANSFORMATION Procedure

This procedure modifies the transformation expression for the given transformation.

Syntax

DBMS_TRANSFORM.MODIFY_TRANSFORMATION (
   schema             VARCHAR2(30),
   name               VARCHAR2(30),
   attribute_number   INTEGER,
   transformation     VARCHAR2(4000));

Parameters

Table 138-4 MODIFY_TRANSFORMATION Procedure Parameters

Parameter Description
schema Specifies the schema of the transformation.
name Specifies the name of the transformation.
attribute_number The attribute of the target type for which the new transformation expression is being specified. When specifying the new transformation as a single expression of the target type, specify a value of 0.
transformation The transformation expression must be a SQL expression or a PL/SQL function returning the type of the specified attribute of the target type. If the attribute_number is 0, then the expression must be a PL/SQL function returning an object of the target type or a constructor expression for the target type.

Usage Notes