Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Data Types and Expressions > Data Type >

Opaque Data Types

An opaque data type is a user-defined data type that can be used in the same way as a built-in data type. To create an opaque type, you must use the CREATE OPAQUE TYPE statement. Because an opaque type is encapsulated, you create support functions to access the individual components of an opaque type. The internal storage details of the type are hidden or opaque.

For more information about how to create an opaque data type and its support functions, see IBM Informix User-Defined Routines and Data Types Developer's Guide.

Because of the maximum row size limit of 32,767 bytes, when you create a new table, no more than approximately 195 columns can be varying-length opaque or distinct user-defined data types. (The same restriction applies to BYTE, TEXT, VARCHAR, LVARCHAR, NVARCHAR, and ROW columns. See ROW Data Types for additional information about ROW data types.)

Complex Data Type (IDS)

Complex data types are ROW types or COLLECTION types that you create from built-in types, opaque types, distinct types, or other complex types.

Read syntax diagramSkip visual syntax diagramComplex Data Type:
 
                        (1)
|--+-| Row Data Types |-------------+---------------------------|
   |                           (2)  |
   '-| Collection Data Types |------'
 

Notes:
  1. See CREATE ROW TYPE
  2. See Collection Data Types

A single complex data type can include multiple components. When you create a complex type, you define the components of the complex type. Unlike an opaque type, however, a complex type is not encapsulated. You can use SQL to access the individual components of a complex data type. The individual components of a complex data type are called elements.

Dynamic Server supports the following categories of complex data types:

The elements of a COLLECTION data type must all be of the same data type. You can use the keyword COLLECTION in SPL data type declarations to specify an untyped collection variable. NULL values are not supported in elements of COLLECTION data types.

The elements of a ROW data type can be of different data types, but the pattern of data types from the first to the last element cannot vary for a given ROW data type. NULL values are supported in elements of ROW data types, unless you specify otherwise in the data type declaration or in a constraint.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]