3. OpenAPI Data Types : OpenAPI Data Structures : IIAPI_DESCRIPTOR Data Type--Provide Description for OpenAPI Data
 
Share this page                  
IIAPI_DESCRIPTOR Data Type--Provide Description for OpenAPI Data
The IIAPI_DESCRIPTOR data type describes OpenAPI data, including its type, length, precision, scale, and usage. This data is normally stored in an array of II_DATAVALUE data type values.
This data type has the following syntax:
typedef struct _IIAPI_DESCRIPTOR
{
       IIAPI_DT_ID   ds_dataType;
       II_BOOL       ds_nullable;
       II_UINT2      ds_length;
       II_INT2       ds_precision;
       II_INT2       de_scale;
       II_INT2       ds_columnType;
       II_CHAR       *ds_columnName;
} IIAPI_DESCRIPTOR;
This data type has the following parameters:
ds_dataType
Specifies the data type of the value being described.
ds_nullable
Indicates whether the data is nullable. If so, this parameter is TRUE; otherwise, it is FALSE.
ds_length
Specifies the length of the value being described.
ds_precision
Specifies the precision of the value being described. It is valid only when the ds_dataType is IIAPI_DEC_TYPE or IIAPI_FLT_TYPE.
ds_scale
Specifies the scale of the value being described. It is valid only when the ds_dataType parameter is IIAPI_DEC_TYPE.
ds_columnType
Specifies the usage of the value being described. Its value can be one of the following:
IIAPI_COL_TUPLE
IIAPI_COL_PROCBYREFPARM
IIAPI_COL_PROCPARM
IIAPI_COL_SVCPARM
IIAPI_COL_QPARM
IIAPI_COL_PROCINPARM
Note:  IIAPI_COL_PROCINPARM is a synonym for IIAPI_COL_PROCPARM.
IIAPI_COL_PROCOUTPARM
IIAPI_COL_PROCINOUTPARM
Note:  IIAPI_COL_PROCINOUTPARM is a synonym for IIAPI_COL_PROCBYREFPARM.
For a description of how IIapi_query() uses column types to describe its parameters, see Query Data Correlation. Except for the information there, copy and tuple data always have the column type of IIAPI_DS_TUPLE.
ds_columnName
Specifies the symbolic name of the OpenAPI data. It is used only when the data is copy file data, or a procedure parameter.