Was this helpful?
Data Type Descriptions
Ingres data types are described as follows.
IIAPI_BOOL_TYPE
Specifies a single byte logical value with 0 representing FALSE and 1 representing TRUE.
IIAPI_BYTE_TYPE
Specifies a fixed-length binary string containing data with the declared length. The declared length is stored as the ds_length parameter in the corresponding data descriptor.
Limits: Length is 1 to DBMS maximum bytes.
IIAPI_CHA_TYPE
Specifies a fixed-length character string that is stored blank-padded to the declared length. The declared length is stored as the ds_length parameter in the corresponding data descriptor. Embedded blanks are significant. Valid characters for this data type include printing, non-printing, and NULL characters.
Limits: Length is 1 to DBMS maximum characters.
IIAPI_CHR_TYPE
Specifies a fixed-length character string that is stored blank-padded to the declared length. The declared length is stored as the ds_length parameter in the corresponding data descriptor. Embedded blanks are insignificant. Valid characters for this data type include printing characters only. This data type is supported for previous Ingres versions; when possible, use IIAPI_CHA_TYPE.
Limits: Length is 1 to DBMS maximum characters.
IIAPI_HNDL_TYPE
Specifies a data type used only by OpenAPI and the application. This data type describes a handle, which is a pointer to one of the control blocks created by OpenAPI. OpenAPI translates the information in the control block into data acceptable by the data source. This data type does not appear in queries.
IIAPI_DATE_TYPE
Specifies an ANSI date data type that is stored in 4 bytes. IIapi_convertData() or IIapi_formatData() can be used to convert to character string representation.
IIAPI_ADATE_TYPE is a synonym for IIAPI_DATE_TYPE.
IIAPI_DEC_TYPE
Specifies a packed-decimal data type stored in 1 to 16 bytes depending on the precision of the value as follows: len = (precision)/2 + 1. IIapi_convertData() or IIapi_formatData() can be used to convert to character string or floating point representation.
IIAPI_DTE_TYPE
Specifies an Ingres internal date data type that is stored in 12 bytes. IIapi_convertData() or IIapi_formatData() can be used to convert to character string or floating point representation.
IIAPI_IDATE_TYPE is a synonym for IIAPI_DTE_TYPE.
IIAPI_FLT_TYPE
Specifies a floating-point data type.
Limits: Data value range is ‑1.0e+38 to +1.0e+38.
IIAPI_INT_TYPE
Specifies a data type supporting varying data value ranges. It is dependent on the ds_length of the data value.
Limits:
If the length is 1, the range is -128 to +127.
If the length is 2, the range is -32,768 to +32,767.
If the length is 4, the range is -2,147,483,648 to +2,147,483,647.
If the length is 8, the range is ‑9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
IIAPI_INTDS_TYPE
Specifies an ANSI day to second interval data type that is stored in 12 bytes. IIapi_convertData() or IIapi_formatData() can be used to convert to character string representation.
IIAPI_INTYM_TYPE
Specifies an ANSI year to date interval data type that is stored in 3 bytes. IIapi_convertData() or IIapi_formatData() can be used to convert to character string representation.
IIAPI_IPV4_TYPE
Specifies a four byte binary value representing a TCP-IP version 4 address.
IIAPI_IPV6_TYPE
Specifies a sixteen byte binary value representing a TCP-IP version 6 address.
IIAPI_LOGKEY_TYPE
Specifies a data type with values unique within the data source. An application should not attempt to update a column containing a system-maintained object key.
IIAPI_LBYTE_TYPE
Specifies a variable-length binary string. The actual length of the large byte segment is stored in the first two bytes of the data buffer, followed by the large byte data.
Limits: Length is 0 to 2,000,000,000 bytes.
IIAPI_LNVCH_TYPE
Specifies a variable-length National Character Set string. Each character in the string is represented by an unsigned two-byte integer holding a UCS-2-encoded character. The actual length in characters of the large nvarchar segment is stored in the first two bytes of the data buffer, followed by the large nvarchar data.
Limits: Length is 0 to 1,000,000,000 NCS characters.
IIAPI_LVCH_TYPE
Specifies a variable-length character string. The actual length of the large varchar segment is stored in the first two bytes of the data buffer, followed by the large varchar data. Valid characters for this data type include printing, non-printing, and NULL characters. Trailing blanks are insignificant in a varchar data type.
Limits: Length is 0 to 2,000,000,000 characters.
IIAPI_LTXT_TYPE
Specifies a variable-length character string. The maximum size for this data type is stored as the ds_length parameter in the corresponding descriptor. The actual length of the text data is stored in the first two bytes of the data buffer, followed by the text data.
Valid characters for this data type include printing and nonprinting characters. All blanks are significant in a text data buffer. This type is supported for typeless NULL values. A NULL value of this type can be coerced into any other data type. Otherwise, use IIAPI_VCH_TYPE.
Limits: Length is 1 to DBMS maximum characters.
IIAPI_LCLOC_TYPE
Specifies a long character locator—a reference to a long varchar string that resides in the database. A locator value is an unsigned 4-byte integer.
IIAPI_LBLOC_TYPE
Specifies a long binary locator—a reference to a long byte string that resides in the database. A locator value is an unsigned 4-byte integer.
IIAPI_LNLOC_TYPE
Specifies a long National Character Set locator—a reference to a long nvarchar string that resides in the database. A locator value is an unsigned 4-byte integer.
IIAPI_MNY_TYPE
Specifies the Ingres money data type stored in 8 bytes with two fixed decimal places. IIapi_convertData() or IIapi_formatData() can be used to convert to character string or floating point representation.
IIAPI_NCHA_TYPE
Specifies a fixed length National Character Set string that is stored blank-padded to the declared length. Each character in the string is represented by an unsigned two-byte integer holding a UCS-2 encoded character. The full byte length (twice the declared character length) is stored as the ds_length parameter in the corresponding data descriptor.
Limits: Length is 1 to DBMS maximum NCS characters.
IIAPI_NVCH_TYPE
Specifies a variable-length National Character Set string. Each character in the string is represented by an unsigned two-byte integer holding a UCS-2 encoded character. The maximum size in bytes for nvarchar data is stored as the ds_length parameter in the corresponding descriptor. The actual length in characters of the varchar data is stored in the first two bytes of the data buffer, followed by the nvarchar data.
Limits: Length is 0 to DBMS maximum NCS characters.
IIAPI_TABKEY_TYPE
Specifies a data type with a value that is unique within the table where the table key is stored. An application should not attempt to update a column containing a system-maintained table key.
IIAPI_TIME_TYPE
Specifies an Ingres time data type with local time zone that is stored in 10 bytes. IIapi_convertData() or IIapi_formatData() can be used to convert to character string representation.
IIAPI_TMTZ_TYPE
Specifies an ANSI time data type with timezone that is stored in 10 bytes. IIapi_convertData() or IIapi_formatData() can be used to convert to character string representation.
IIAPI_TMWO_TYPE
Specifies an ANSI time data type without time zone that is stored in 10 bytes. IIapi_convertData() or IIapi_formatData() can be used to convert to character string representation.
IIAPI_TS_TYPE
Specifies an Ingres timestamp data type with local timezone that is stored in 14 bytes. IIapi_convertData() or IIapi_formatData() can be used to convert to character string representation.
IIAPI_TSTZ_TYPE
ANSI timestamp data type with timezone that is stored in 14 bytes. IIapi_convertData() or IIapi_formatData() can be used to convert to character string representation.
IIAPI_TSWO_TYPE
Specifies an ANSI timestamp data type without time zone that is stored in 14 bytes. IIapi_convertData() or IIapi_formatData() can be used to convert to character string representation.
IIAPI_TXT_TYPE
Specifies a variable-length character string. The maximum size for this data type is stored as the ds_length parameter in the corresponding descriptor. The actual length of the text data is stored in the first two bytes of the data buffer, followed by the text data. Valid characters for this data type include printing and non-printing characters. All blanks are significant in a text data buffer. This type is supported for previous Ingres versions; when possible, use IIAPI_VCH_TYPE.
Limits: Length is 1 to DBMS maximum characters.
IIAPI_UUID_TYPE
Specifies a sixteen byte binary value representing a universally unique identifier.
IIAPI_VBYTE_TYPE
Specifies a variable-length binary string. The maximum size for varbyte data is stored as the ds_length parameter in the corresponding descriptor. The actual length of the varbyte data is stored in the first two bytes of the data buffer, followed by the varbyte data.
Limits: Length is 0 to 2,000 bytes.
IIAPI_VCH_TYPE
Specifies a variable-length character string. The maximum size for varchar data is stored as the ds_length parameter in the corresponding descriptor. The actual length of the varchar data is stored in the first two bytes of the data buffer, followed by the varchar data. Trailing blanks are insignificant in a varchar data type.
Limits: Length is 0 to 2,000 characters.
Last modified date: 12/14/2023