Oracle Data Types Design Time: Artifact Generation

Oracle JCA Adapter for Database 9-95 restriction base=string maxLength value=10 restriction simpleType sequence complexType The minOccurs value is 0 to allow for an empty collection. The maxOccurs value is set to the maximum number of items that the collection can hold. Note that the db:index attribute is not used. Having nillable set to true allows individual items in the VARRAY to be null. Note the use of the restriction specified on the element of the VARRAY, FOO. This is used on types such as CHAR and VARCHAR2, whose length is known from the declaration of the VARRAY or nested table. It specifies the type and maximum length of the element. An element value that exceeds the specified length causes the instance XML to fail during schema validation. The attribute values of a parameter declared to be of type FOO look as follows in the generated XSD: element name=X type=db:FOO db:type=Array db:index=1 minOccurs=0 nillable=true The type and db:type values indicate that the parameter is represented as an array defined by the complexType called FOO in the XSD file. The value for db:index is whatever the position of that parameter is in the stored procedure. A nested table is treated almost identically to a VARRAY. The following nested table type definition, SQL CREATE TYPE FOO AS TABLE OF VARCHAR2 10; is also generated as a complexType with a single element in its sequence, called name _ITEM. The element has the same attributes as in the VARRAY example, except that the maxOccurs value is unbounded because nested tables can be of arbitrary size. complexType name=FOO sequence element name=X_ITEM … maxOccurs=unbounded nillable=true … element sequence complexType An identical restriction is generated for the X_ITEM element in the VARRAY. The attributes of a parameter, X, declared to be of this type, are the same as in the VARRAY example. Note that collections Varray and nested table are not supported if they are defined inside of a PLSQL package specification. For example: SQL create package pkg as type vary is varray10 of number; type ntbl is table of varchar2100; procedure testv in vary, n in ntbl; end; If a user selects the test procedure in the Adapter Configuration Wizard for stored procedures, an error occurs stating that the types are not supported. However, if the