##  all of these values are harvested from $II_SYSTEM/ingres/files/iiapi.h,
##  so they will have to be repeatedly reviewed for breaking changes

IIAPI_VERSION_1 = 1
IIAPI_VERSION_2 = 2
IIAPI_VERSION_3 = 3
IIAPI_VERSION_4 = 4
IIAPI_VERSION_5 = 5
IIAPI_VERSION_6 = 6
IIAPI_VERSION_7 = 7
IIAPI_VERSION_8 = 8
IIAPI_VERSION_9 = 9
IIAPI_VERSION_10 = 10
IIAPI_VERSION_11 = 11
IIAPI_VERSION = IIAPI_VERSION_11

IIAPI_LEVEL_0 = 0
IIAPI_LEVEL_1 = 1
IIAPI_LEVEL_2 = 2
IIAPI_LEVEL_3 = 3
IIAPI_LEVEL_4 = 4
IIAPI_LEVEL_5 = 5
IIAPI_LEVEL_6 = 6
IIAPI_LEVEL_7 = 7

IIAPI_HNDL_TYPE = -1       ## API Handle 
IIAPI_CHR_TYPE = 32        ## Text Fixed 
IIAPI_CHA_TYPE = 20        ## Character Fixed 
IIAPI_VCH_TYPE = 21        ## Character Variable 
IIAPI_LVCH_TYPE = 22       ## Character Long 
IIAPI_LCLOC_TYPE = 36      ## Character Long Locator 
IIAPI_BYTE_TYPE = 23       ## Binary Fixed 
IIAPI_VBYTE_TYPE = 24      ## Binary Variable 
IIAPI_LBYTE_TYPE = 25      ## Binary Long 
IIAPI_LBLOC_TYPE = 35      ## Binary Long Locator 
IIAPI_NCHA_TYPE = 26       ## Unicode Fixed 
IIAPI_NVCH_TYPE = 27       ## Unicode Variable 
IIAPI_LNVCH_TYPE = 28      ## Unicode Long 
IIAPI_LNLOC_TYPE = 29      ## Unicode Long Locator 
IIAPI_TXT_TYPE = 37        ## Text Variable 
IIAPI_LTXT_TYPE = 41       ## Text Var (typeless NULL) 
IIAPI_INT_TYPE = 30        ## Integer 
IIAPI_FLT_TYPE = 31        ## Floating Point 
IIAPI_MNY_TYPE =  5        ## Money 
IIAPI_DEC_TYPE = 10        ## Decimal 
IIAPI_BOOL_TYPE = 38       ## Boolean 
IIAPI_UUID_TYPE = 55       ## UUID 
IIAPI_IPV4_TYPE = 66       ## IPv4 
IIAPI_IPV6_TYPE = 67       ## IPv6 
IIAPI_DTE_TYPE =  3        ## Ingres Date 
IIAPI_IDATE_TYPE = IIAPI_DTE_TYPE
IIAPI_DATE_TYPE =  4       ## ANSI Date 
IIAPI_ADATE_TYPE = IIAPI_DATE_TYPE
IIAPI_TIME_TYPE =  8       ## Time 
IIAPI_TMWO_TYPE =  6       ## Time without Timezone 
IIAPI_TMTZ_TYPE =  7       ## Time with Timezone 
IIAPI_TS_TYPE = 19         ## Timestamp 
IIAPI_TSWO_TYPE =  9       ## Timestamp without Timezone 
IIAPI_TSTZ_TYPE = 18       ## Timestamp with Timezone 
IIAPI_INTYM_TYPE = 33      ## Interval Year to Month 
IIAPI_INTDS_TYPE = 34      ## Interval Day to Second 
IIAPI_LOGKEY_TYPE = 11     ## Logical Key 
IIAPI_TABKEY_TYPE = 12     ## Table Key 
IIAPI_GEOM_TYPE = 56       ## Spatial Long Byte 
IIAPI_POINT_TYPE = 57      ## Point Long Byte 
IIAPI_MPOINT_TYPE = 58     ## MPoint Long Byte 
IIAPI_LINE_TYPE = 59       ## Line Long Byte 
IIAPI_MLINE_TYPE = 61      ## MLine Long Byte 
IIAPI_POLY_TYPE = 62       ## Poly Long Byte 
IIAPI_MPOLY_TYPE = 63      ## Mpoly Long Byte 
IIAPI_NBR_TYPE = 64        ## NBR Byte 
IIAPI_GEOMC_TYPE = 65      ## Geomc Long Byte 
IIAPI_CURVE_TYPE = 68      ## CURVE Spatial Type 
IIAPI_SURF_TYPE = 69       ## SURF Spatial Type 
IIAPI_PSURF_TYPE = 70      ## PSURF Spatial Type 
IIAPI_GEOMZ_TYPE = 71      ## GEOMZ Spatial Type 
IIAPI_POINTZ_TYPE = 72     ## POINTZ Spatial Type 
IIAPI_LINEZ_TYPE = 73      ## LINEZ Spatial Type 
IIAPI_POLYZ_TYPE = 74      ## POLYZ Spatial Type 
IIAPI_MPOINTZ_TYPE = 75    ## MPOINTZ Spatial Type 
IIAPI_MLINEZ_TYPE = 76     ## MLINEZ Spatial Type 
IIAPI_MPOLYZ_TYPE = 77     ## MPOLYZ Spatial Type 
IIAPI_GEOMCZ_TYPE = 78     ## GEOMCZ Spatial Type 
IIAPI_CURVEZ_TYPE = 79     ## CURVEZ Spatial Type 
IIAPI_SURFZ_TYPE = 80      ## SURFZ Spatial Type 
IIAPI_PSURFZ_TYPE = 81     ## PSURFZ Spatial Type 
IIAPI_GEOMM_TYPE = 82      ## GEOMM Spatial Type 
IIAPI_POINTM_TYPE = 83     ## POINTM Spatial Type 
IIAPI_LINEM_TYPE = 84      ## LINEM Spatial Type 
IIAPI_POLYM_TYPE = 85      ## POLYM Spatial Type 
IIAPI_MPOINTM_TYPE = 86    ## MPOINTM Spatial Type 
IIAPI_MLINEM_TYPE = 87     ## MLINEM Spatial Type 
IIAPI_MPOLYM_TYPE = 88     ## MPOLYM Spatial Type 
IIAPI_GEOMCM_TYPE = 89     ## GEOMCM Spatial Type 
IIAPI_CURVEM_TYPE = 90     ## CURVEM Spatial Type 
IIAPI_SURFM_TYPE = 91      ## SURFM Spatial Type 
IIAPI_PSURFM_TYPE = 92     ## PSURFM Spatial Type 
IIAPI_GEOMZM_TYPE = 93     ## GEOMZM Spatial Type 
IIAPI_POINTZM_TYPE = 94    ## POINTZM Spatial Type 
IIAPI_LINEZM_TYPE = 95     ## LINEZM Spatial Type 
IIAPI_POLYZM_TYPE = 100    ## POLYZM Spatial Type 
IIAPI_MPOINTZM_TYPE = 101  ## MPOINTZM Spatial Type 
IIAPI_MLINEZM_TYPE = 102   ## MLINEZM Spatial Type 
IIAPI_MPOLYZM_TYPE = 103   ## MPOLYZM Spatial Type 
IIAPI_GEOMCZM_TYPE = 104   ## GEOMCZM Spatial Type 
IIAPI_CURVEZM_TYPE = 105   ## CURVEZM Spatial Type 
IIAPI_SURFZM_TYPE = 106    ## SURFZM Spatial Type 
IIAPI_PSURFZM_TYPE = 107   ## PSURFZM Spatial Type 
IIAPI_MCURVE_TYPE = 108    ## MCURVE Spatial Type 
IIAPI_MSURF_TYPE = 109     ## MSURF Spatial Type 
IIAPI_MCURVEZ_TYPE = 110   ## MCURVEZ Spatial Type 
IIAPI_MSURFZ_TYPE = 111    ## MSURFZ Spatial Type 
IIAPI_MCURVEM_TYPE = 112   ## MCURVEM Spatial Type 
IIAPI_MSURFM_TYPE = 113    ## MSURFM Spatial Type 
IIAPI_MCURVEZM_TYPE = 114  ## MCURVEZM Spatial Type 
IIAPI_MSURFZM_TYPE = 115   ## MSURFZM Spatial Type 
IIAPI_CSTR_TYPE = 116      ## CSTR Spatial Type 
IIAPI_CSTRZ_TYPE = 117     ## CSTRZ Spatial Type 
IIAPI_CSTRM_TYPE = 118     ## CSTRM Spatial Type 
IIAPI_CSTRZM_TYPE = 119    ## CSTRZM Spatial Type 
IIAPI_CCURVE_TYPE = 120    ## CCURVE Spatial Type 
IIAPI_CCURVEZ_TYPE = 121   ## CCURVEZ Spatial Type 
IIAPI_CCURVEM_TYPE = 122   ## CCURVEM Spatial Type 
IIAPI_CCURVEZM_TYPE = 123  ## CCURVEZM Spatial Type 
IIAPI_CPOLY_TYPE = 124     ## CPOLY Spatial Type 
IIAPI_CPOLYZ_TYPE = 125    ## CPOLYZ Spatial Type 
IIAPI_CPOLYM_TYPE = 126    ## CPOLYM Spatial Type 
IIAPI_CPOLYZM_TYPE = 127   ## CPOLYZM Spatial Type 
IIAPI_TIN_TYPE = 128       ## TIN Spatial Type 
IIAPI_TINZ_TYPE = 129      ## TINZ Spatial Type 
IIAPI_TINM_TYPE = 130      ## TINM Spatial Type 
IIAPI_TINZM_TYPE = 131     ## TINZM Spatial Type 
IIAPI_TRI_TYPE = 132       ## TRI Spatial Type 
IIAPI_TRIZ_TYPE = 133      ## TRIZ Spatial Type 
IIAPI_TRIM_TYPE = 134      ## TRIM Spatial Type 
IIAPI_TRIZM_TYPE = 135     ## TRIZM Spatial Type 
IIAPI_BOX_TYPE = 136       ## BOX Spatial Type 
IIAPI_BOXZ_TYPE = 137      ## BOXZ Spatial Type 

IIAPI_VAR_TYPES = {IIAPI_VBYTE_TYPE, IIAPI_VCH_TYPE, IIAPI_NVCH_TYPE}
IIAPI_LONG_TYPES = {IIAPI_LVCH_TYPE, IIAPI_LBYTE_TYPE, IIAPI_LNVCH_TYPE, 
    IIAPI_GEOM_TYPE, IIAPI_POINT_TYPE, IIAPI_MPOINT_TYPE,
    IIAPI_LINE_TYPE, IIAPI_MLINE_TYPE, IIAPI_POLY_TYPE,
    IIAPI_MPOLY_TYPE, IIAPI_NBR_TYPE, IIAPI_GEOMC_TYPE}


IIAPI_BOOL_LEN = 1
IIAPI_DATE_LEN = 4
IIAPI_ADATE_LEN = IIAPI_DATE_LEN
IIAPI_DTE_LEN = 12
IIAPI_EP_MAX_SEGMENT_LEN = 24
IIAPI_F4_LEN = 4
IIAPI_F8_LEN = 8
IIAPI_GI_LOB_LENGTH = 0x0001
IIAPI_I1_LEN = 1
IIAPI_I2_LEN = 2
IIAPI_I4_LEN = 4
IIAPI_I8_LEN = 8
IIAPI_IDATE_LEN = IIAPI_DTE_LEN
IIAPI_INTDS_LEN = 12
IIAPI_INTYM_LEN = 3
IIAPI_LOCATOR_LEN = 4
IIAPI_LOGKEY_LEN = 16
IIAPI_MNY_LEN = 8
IIAPI_SEGMENT_LEN = 2000
IIAPI_TABKEY_LEN = 8
IIAPI_TIME_LEN = 10
IIAPI_TS_LEN = 14
IIAPI_OBJKEYSZ = 16
IIAPI_TBLKEYSZ = 8
IIAPI_UUID_LEN = 16
IIAPI_IPV4_LEN = 4
IIAPI_IPV6_LEN = 16


IIAPI_MIB_CONN = 'exp.aif.api.conn'
IIAPI_MIB_CONN_GCA_ASSOC = 'exp.aif.api.conn.gca_assoc'
IIAPI_MIB_CONN_TARGET = 'exp.aif.api.conn.target'
IIAPI_MIB_CONN_USERID = 'exp.aif.api.conn.userid'
IIAPI_MIB_TRACE_LEVEL = 'exp.aif.api.trace_level'

IIAPI_ST_SUCCESS = 0
IIAPI_ST_MESSAGE = 1
IIAPI_ST_WARNING = 2
IIAPI_ST_NO_DATA = 3
IIAPI_ST_ERROR = 4
IIAPI_ST_FAILURE = 5
IIAPI_ST_NOT_INITIALIZED = 6
IIAPI_ST_INVALID_HANDLE = 7
IIAPI_ST_OUT_OF_MEMORY = 8
IIAPI_ST_MSG = {
    IIAPI_ST_SUCCESS: 'IIAPI_ST_SUCCESS',
    IIAPI_ST_MESSAGE: 'IIAPI_ST_MESSAGE',
    IIAPI_ST_WARNING: 'IIAPI_ST_WARNING',
    IIAPI_ST_NO_DATA: 'IIAPI_ST_NO_DATA',
    IIAPI_ST_ERROR: 'IIAPI_ST_ERROR',
    IIAPI_ST_FAILURE: 'IIAPI_ST_FAILURE',
    IIAPI_ST_NOT_INITIALIZED: 'IIAPI_ST_NOT_INITIALIZED',
    IIAPI_ST_INVALID_HANDLE: 'IIAPI_ST_INVALID_HANDLE',
    IIAPI_ST_OUT_OF_MEMORY: 'IIAPI_ST_OUT_OF_MEMORY',
}

IIAPI_CURSOR_SCROLL = 2
IIAPI_CURSOR_UPDATE = 1

IIAPI_COL_PROCBYREFPARM = 1
IIAPI_COL_PROCGTTPARM = 5
IIAPI_COL_PROCINOUTPARM = 1
IIAPI_COL_PROCINPARM = 2
IIAPI_COL_PROCOUTPARM = 6
IIAPI_COL_PROCPARM = 2
IIAPI_COL_QPARM = 4
IIAPI_COL_SVCPARM = 3
IIAPI_COL_TUPLE = 0

IIAPI_CP_APP_ID = 27
IIAPI_CP_APPLICATION = 26
IIAPI_CP_CENTURY_BOUNDARY = 37
IIAPI_CP_CHAR_WIDTH = 1
IIAPI_CP_BASE = IIAPI_CP_CHAR_WIDTH
IIAPI_CP_DATE_ALIAS = 40
IIAPI_CP_DATE_FORMAT = 19
IIAPI_CP_DBMS_PASSWORD = 36
IIAPI_CP_DECIMAL_CHAR = 16
IIAPI_CP_EFFECTIVE_USER = 29
IIAPI_CP_EXCLUSIVE_LOCK = 32
IIAPI_CP_EXCLUSIVE_SYS_UPDATE = 30
IIAPI_CP_FLOAT4_PRECISION = 8
IIAPI_CP_FLOAT4_STYLE = 11
IIAPI_CP_FLOAT4_WIDTH = 6
IIAPI_CP_FLOAT8_PRECISION = 9
IIAPI_CP_FLOAT8_STYLE = 12
IIAPI_CP_FLOAT8_WIDTH = 7
IIAPI_CP_GATEWAY_PARM = 35
IIAPI_CP_GROUP_ID = 28
IIAPI_CP_INT1_WIDTH = 3
IIAPI_CP_INT2_WIDTH = 4
IIAPI_CP_INT4_WIDTH = 5
IIAPI_CP_INT8_WIDTH = 39
IIAPI_CP_LOGIN_LOCAL = 38
IIAPI_CP_MATH_EXCP = 17
IIAPI_CP_MISC_PARM = 34
IIAPI_CP_MONEY_LORT = 15
IIAPI_CP_MONEY_PRECISION = 10
IIAPI_CP_MONEY_SIGN = 14
IIAPI_CP_NATIVE_LANG = 24
IIAPI_CP_NATIVE_LANG_CODE = 25
IIAPI_CP_NUMERIC_TREATMENT = 13
IIAPI_CP_RESULT_TBL = 22
IIAPI_CP_SECONDARY_INX = 21
IIAPI_CP_SERVER_TYPE = 23
IIAPI_CP_SHARED_SYS_UPDATE = 31
IIAPI_CP_STRING_TRUNC = 18
IIAPI_CP_TIMEZONE = 20
IIAPI_CP_TOP = IIAPI_CP_DATE_ALIAS
IIAPI_CP_TXT_WIDTH = 2
IIAPI_CP_WAIT_LOCK = 33

IIAPI_CT_NS = 3
IIAPI_CT_SQL = 1

IIAPI_EP_CENTURY_BOUNDARY = 23
IIAPI_EP_CHAR_WIDTH = 1
IIAPI_EP_BASE = IIAPI_EP_CHAR_WIDTH
IIAPI_EP_DATE_ALIAS = 29
IIAPI_EP_DATE_FORMAT = 19
IIAPI_EP_DECIMAL_CHAR = 16
IIAPI_EP_EVENT_FUNC = 27
IIAPI_EP_FLOAT4_PRECISION = 8
IIAPI_EP_FLOAT4_STYLE = 11
IIAPI_EP_FLOAT4_WIDTH = 6
IIAPI_EP_FLOAT8_PRECISION = 9
IIAPI_EP_FLOAT8_STYLE = 12
IIAPI_EP_FLOAT8_WIDTH = 7
IIAPI_EP_INT1_WIDTH = 3
IIAPI_EP_INT2_WIDTH = 4
IIAPI_EP_INT4_WIDTH = 5
IIAPI_EP_INT8_WIDTH = 28
IIAPI_EP_MATH_EXCP = 17
IIAPI_EP_MONEY_LORT = 15
IIAPI_EP_MONEY_PRECISION = 10
IIAPI_EP_MONEY_SIGN = 14
IIAPI_EP_NATIVE_LANG = 21
IIAPI_EP_NATIVE_LANG_CODE = 22
IIAPI_EP_NUMERIC_TREATMENT = 13
IIAPI_EP_PROMPT_FUNC = 26
IIAPI_EP_STRING_TRUNC = 18
IIAPI_EP_TIMEZONE = 20
IIAPI_EP_TOP = IIAPI_EP_DATE_ALIAS
IIAPI_EP_TRACE_FUNC = 25
IIAPI_EP_TXT_WIDTH = 2
IIAPI_EP_MSG = {
    IIAPI_EP_CENTURY_BOUNDARY: 'IIAPI_EP_CENTURY_BOUNDARY',
    IIAPI_EP_CHAR_WIDTH: 'IIAPI_EP_CHAR_WIDTH',
    IIAPI_EP_BASE: 'IIAPI_EP_BASE',
    IIAPI_EP_DATE_ALIAS: 'IIAPI_EP_DATE_ALIAS',
    IIAPI_EP_DATE_FORMAT: 'IIAPI_EP_DATE_FORMAT',
    IIAPI_EP_DECIMAL_CHAR: 'IIAPI_EP_DECIMAL_CHAR',
    IIAPI_EP_EVENT_FUNC: 'IIAPI_EP_EVENT_FUNC',
    IIAPI_EP_FLOAT4_PRECISION: 'IIAPI_EP_FLOAT4_PRECISION',
    IIAPI_EP_FLOAT4_STYLE: 'IIAPI_EP_FLOAT4_STYLE',
    IIAPI_EP_FLOAT4_WIDTH: 'IIAPI_EP_FLOAT4_WIDTH',
    IIAPI_EP_FLOAT8_PRECISION: 'IIAPI_EP_FLOAT8_PRECISION',
    IIAPI_EP_FLOAT8_STYLE: 'IIAPI_EP_FLOAT8_STYLE',
    IIAPI_EP_FLOAT8_WIDTH: 'IIAPI_EP_FLOAT8_WIDTH',
    IIAPI_EP_INT1_WIDTH: 'IIAPI_EP_INT1_WIDTH',
    IIAPI_EP_INT2_WIDTH: 'IIAPI_EP_INT2_WIDTH',
    IIAPI_EP_INT4_WIDTH: 'IIAPI_EP_INT4_WIDTH',
    IIAPI_EP_INT8_WIDTH: 'IIAPI_EP_INT8_WIDTH',
    IIAPI_EP_MATH_EXCP: 'IIAPI_EP_MATH_EXCP',
    IIAPI_EP_MONEY_LORT: 'IIAPI_EP_MONEY_LORT',
    IIAPI_EP_MONEY_PRECISION: 'IIAPI_EP_MONEY_PRECISION',
    IIAPI_EP_MONEY_SIGN: 'IIAPI_EP_MONEY_SIGN',
    IIAPI_EP_NATIVE_LANG: 'IIAPI_EP_NATIVE_LANG',
    IIAPI_EP_NATIVE_LANG_CODE: 'IIAPI_EP_NATIVE_LANG_CODE',
    IIAPI_EP_NUMERIC_TREATMENT: 'IIAPI_EP_NUMERIC_TREATMENT',
    IIAPI_EP_PROMPT_FUNC: 'IIAPI_EP_PROMPT_FUNC',
    IIAPI_EP_STRING_TRUNC: 'IIAPI_EP_STRING_TRUNC',
    IIAPI_EP_TIMEZONE: 'IIAPI_EP_TIMEZONE',
    IIAPI_EP_TOP: 'IIAPI_EP_TOP',
    IIAPI_EP_TRACE_FUNC: 'IIAPI_EP_TRACE_FUNC',
    IIAPI_EP_TXT_WIDTH: 'IIAPI_EP_TXT_WIDTH',
}


IIAPI_EPV_ANSIDATE = 'ansidate'
IIAPI_EPV_DECASDEC = 'd'
IIAPI_EPV_DECASFLOAT = 'f'
IIAPI_EPV_DFRMT_ANSI = 10
IIAPI_EPV_DFRMT_DMY = 7
IIAPI_EPV_DFRMT_FINNISH = 2
IIAPI_EPV_DFRMT_GERMAN = 4
IIAPI_EPV_DFRMT_ISO = 3
IIAPI_EPV_DFRMT_ISO4 = 9
IIAPI_EPV_DFRMT_ISO4T = 11
IIAPI_EPV_DFRMT_ISO4TC = 12
IIAPI_EPV_DFRMT_ISO8601 = 13
IIAPI_EPV_DFRMT_MDY = 6
IIAPI_EPV_DFRMT_MLT4 = 8
IIAPI_EPV_DFRMT_MULTI = 1
IIAPI_EPV_DFRMT_US = 0
IIAPI_EPV_DFRMT_YMD = 5
IIAPI_EPV_EXPONENTIAL = 'e'
IIAPI_EPV_FLOATDEC = 'n'
IIAPI_EPV_FLOATDECALIGN = 'g'
IIAPI_EPV_FLOATF = 'f'
IIAPI_EPV_INGDATE = 'ingresdate'
IIAPI_EPV_MONEY_LEAD_SIGN = 0
IIAPI_EPV_MONEY_TRAIL_SIGN = 1
IIAPI_EPV_RET_FATAL = 'fail'
IIAPI_EPV_RET_IGNORE = 'ignore'
IIAPI_EPV_RET_WARN = 'warn'

IIAPI_CPV_ANSIDATE = IIAPI_EPV_ANSIDATE
IIAPI_CPV_BTREE = 'btree'
IIAPI_CPV_CBTREE = 'cbtree'
IIAPI_CPV_CHASH = 'chash'
IIAPI_CPV_CHEAP = 'cheap'
IIAPI_CPV_CISAM = 'cisam'
IIAPI_CPV_DECASDEC = IIAPI_EPV_DECASDEC
IIAPI_CPV_DECASFLOAT = IIAPI_EPV_DECASFLOAT
IIAPI_CPV_DFRMT_ANSI = IIAPI_EPV_DFRMT_ANSI
IIAPI_CPV_DFRMT_DMY = IIAPI_EPV_DFRMT_DMY
IIAPI_CPV_DFRMT_FINNISH = IIAPI_EPV_DFRMT_FINNISH
IIAPI_CPV_DFRMT_GERMAN = IIAPI_EPV_DFRMT_GERMAN
IIAPI_CPV_DFRMT_ISO = IIAPI_EPV_DFRMT_ISO
IIAPI_CPV_DFRMT_ISO4 = IIAPI_EPV_DFRMT_ISO4
IIAPI_CPV_DFRMT_ISO4T = IIAPI_EPV_DFRMT_ISO4T
IIAPI_CPV_DFRMT_ISO4TC = IIAPI_EPV_DFRMT_ISO4TC
IIAPI_CPV_DFRMT_MDY = IIAPI_EPV_DFRMT_MDY
IIAPI_CPV_DFRMT_MLT4 = IIAPI_EPV_DFRMT_MLT4
IIAPI_CPV_DFRMT_MULTI = IIAPI_EPV_DFRMT_MULTI
IIAPI_CPV_DFRMT_US = IIAPI_EPV_DFRMT_US
IIAPI_CPV_DFRMT_YMD = IIAPI_EPV_DFRMT_YMD
IIAPI_CPV_EXPONENTIAL = IIAPI_EPV_EXPONENTIAL
IIAPI_CPV_FLOATDEC = IIAPI_EPV_FLOATDEC
IIAPI_CPV_FLOATDECALIGN = IIAPI_EPV_FLOATDECALIGN
IIAPI_CPV_FLOATF = IIAPI_EPV_FLOATF
IIAPI_CPV_HASH = 'hash'
IIAPI_CPV_HEAP = 'heap'
IIAPI_CPV_INGDATE = IIAPI_EPV_INGDATE
IIAPI_CPV_ISAM = 'isam'
IIAPI_CPV_MONEY_LEAD_SIGN = IIAPI_EPV_MONEY_LEAD_SIGN
IIAPI_CPV_MONEY_TRAIL_SIGN = IIAPI_EPV_MONEY_TRAIL_SIGN
IIAPI_CPV_MONITOR = 1
IIAPI_CPV_RET_FATAL = IIAPI_EPV_RET_FATAL
IIAPI_CPV_RET_IGNORE = IIAPI_EPV_RET_IGNORE
IIAPI_CPV_RET_WARN = IIAPI_EPV_RET_WARN
IIAPI_CPV_SVNORMAL = 0

IIAPI_GE_ERROR = 1
IIAPI_GE_MESSAGE = 3
IIAPI_GE_WARNING = 2
IIAPI_GE_XAERR = 4

IIAPI_GQ_ROW_COUNT = 0x0001
IIAPI_GQ_CURSOR = 0x0002
IIAPI_GQ_PROCEDURE_RET = 0x0004
IIAPI_GQ_PROCEDURE_ID = 0x0008
IIAPI_GQ_REPEAT_QUERY_ID = 0x0010
IIAPI_GQ_TABLE_KEY = 0x0020
IIAPI_GQ_OBJECT_KEY = 0x0040
IIAPI_GQ_ROW_STATUS = 0x0080
IIAPI_GQ_ROW_COUNT_EX = 0x0100

IIAPI_GQF_ALL_UPDATED = 0x0002
IIAPI_GQF_CONTINUE = 0x0020
IIAPI_GQF_END_OF_DATA = 0x0010
IIAPI_GQF_FAIL = 0x0001
IIAPI_GQF_FLUSH_QUERY_ID = 0x0800
IIAPI_GQF_ILLEGAL_XACT_STMT = 0x1000
IIAPI_GQF_INVALID_STATEMENT = 0x0040
IIAPI_GQF_NEW_EFFECTIVE_USER = 0x0400
IIAPI_GQF_NULLS_REMOVED = 0x0004
IIAPI_GQF_OBJECT_KEY = 0x0100
IIAPI_GQF_TABLE_KEY = 0x0200
IIAPI_GQF_TRANSACTION_INACTIVE = 0x0080
IIAPI_GQF_UNKNOWN_REPEAT_QUERY = 0x0008

IIAPI_POS_BEGIN = 0x0001
IIAPI_POS_CURRENT = 0x0003
IIAPI_POS_END = 0x0002

IIAPI_PR_NOECHO = 0x01
IIAPI_PR_TIMEOUT = 0x02
IIAPI_REPLY_TIMEOUT = 0x01

IIAPI_QF_LOCATORS = 0x0001
IIAPI_QF_SCROLL = 0x0002

IIAPI_QT_BASE = 0
IIAPI_QT_QUERY = IIAPI_QT_BASE + 0
IIAPI_QT_ALTER_GROUP = IIAPI_QT_QUERY
IIAPI_QT_ALTER_ROLE = IIAPI_QT_QUERY
IIAPI_QT_ALTER_TABLE = IIAPI_QT_QUERY
IIAPI_QT_COPY_FROM = IIAPI_QT_QUERY
IIAPI_QT_COPY_INTO = IIAPI_QT_QUERY
IIAPI_QT_CREATE_DBEVENT = IIAPI_QT_QUERY
IIAPI_QT_CREATE_GROUP = IIAPI_QT_QUERY
IIAPI_QT_CREATE_INDEX = IIAPI_QT_QUERY
IIAPI_QT_CREATE_INTEGRITY = IIAPI_QT_QUERY
IIAPI_QT_CREATE_PROCEDURE = IIAPI_QT_QUERY
IIAPI_QT_CREATE_ROLE = IIAPI_QT_QUERY
IIAPI_QT_CREATE_RULE = IIAPI_QT_QUERY
IIAPI_QT_CREATE_TABLE = IIAPI_QT_QUERY
IIAPI_QT_CREATE_VIEW = IIAPI_QT_QUERY
IIAPI_QT_CURSOR_DELETE = IIAPI_QT_BASE + 4
IIAPI_QT_CURSOR_UPDATE = IIAPI_QT_BASE + 5
IIAPI_QT_DEF_REPEAT_QUERY = IIAPI_QT_BASE + 6
IIAPI_QT_DELETE = IIAPI_QT_QUERY
IIAPI_QT_DESCRIBE = IIAPI_QT_QUERY
IIAPI_QT_DIRECT_EXEC = IIAPI_QT_QUERY
IIAPI_QT_DROP_DBEVENT = IIAPI_QT_QUERY
IIAPI_QT_DROP_GROUP = IIAPI_QT_QUERY
IIAPI_QT_DROP_INDEX = IIAPI_QT_QUERY
IIAPI_QT_DROP_INTEGRITY = IIAPI_QT_QUERY
IIAPI_QT_DROP_PERMIT = IIAPI_QT_QUERY
IIAPI_QT_DROP_PROCEDURE = IIAPI_QT_QUERY
IIAPI_QT_DROP_ROLE = IIAPI_QT_QUERY
IIAPI_QT_DROP_RULE = IIAPI_QT_QUERY
IIAPI_QT_DROP_TABLE = IIAPI_QT_QUERY
IIAPI_QT_DROP_VIEW = IIAPI_QT_QUERY
IIAPI_QT_EXEC = IIAPI_QT_BASE + 2
IIAPI_QT_EXEC_IMMEDIATE = IIAPI_QT_QUERY
IIAPI_QT_EXEC_PROCEDURE = IIAPI_QT_BASE + 8
IIAPI_QT_EXEC_REPEAT_QUERY = IIAPI_QT_BASE + 7
IIAPI_QT_GET_DBEVENT = IIAPI_QT_QUERY
IIAPI_QT_GRANT = IIAPI_QT_QUERY
IIAPI_QT_INSERT_INTO = IIAPI_QT_QUERY
IIAPI_QT_MODIFY = IIAPI_QT_QUERY
IIAPI_QT_OPEN = IIAPI_QT_BASE + 3
IIAPI_QT_PREPARE = IIAPI_QT_QUERY
IIAPI_QT_RAISE_DBEVENT = IIAPI_QT_QUERY
IIAPI_QT_REGISTER_DBEVENT = IIAPI_QT_QUERY
IIAPI_QT_REMOVE_DBEVENT = IIAPI_QT_QUERY
IIAPI_QT_REVOKE = IIAPI_QT_QUERY
IIAPI_QT_SAVE_TABLE = IIAPI_QT_QUERY
IIAPI_QT_SELECT = IIAPI_QT_QUERY
IIAPI_QT_SELECT_SINGLETON = IIAPI_QT_BASE + 1
IIAPI_QT_SET = IIAPI_QT_QUERY
IIAPI_QT_TOP = IIAPI_QT_EXEC_PROCEDURE
IIAPI_QT_UPDATE = IIAPI_QT_QUERY

IIAPI_ROW_AFTER = 0x0008
IIAPI_ROW_BEFORE = 0x0001
IIAPI_ROW_DELETED = 0x0040
IIAPI_ROW_FIRST = 0x0002
IIAPI_ROW_INSERTED = 0x0010
IIAPI_ROW_LAST = 0x0004
IIAPI_ROW_UPDATED = 0x0020

IIAPI_SCROLL_ABSOLUTE = 0x0008
IIAPI_SCROLL_AFTER = 0x0007
IIAPI_SCROLL_BEFORE = 0x0001
IIAPI_SCROLL_CURRENT = 0x0004
IIAPI_SCROLL_FIRST = 0x0002
IIAPI_SCROLL_LAST = 0x0006
IIAPI_SCROLL_NEXT = 0x0005
IIAPI_SCROLL_PRIOR = 0x0003
IIAPI_SCROLL_RELATIVE = 0x0009

IIAPI_SVR_DEFAULT = 0x0000
IIAPI_SVR_FORMATTED = 0x0010
IIAPI_SVR_MESSAGE = 0x0001
IIAPI_SVR_WARNING = 0x0002

IIAPI_TI_IIXID = 1
IIAPI_TI_XAXID = 2
IIAPI_TRAN_MAXNAME = 64

IIAPI_XA_1PC = 0x40000000
IIAPI_XA_BRANCH_FLAG_1PC = 0x0008
IIAPI_XA_BRANCH_FLAG_2PC = 0x0004
IIAPI_XA_BRANCH_FLAG_FIRST = 0x0001
IIAPI_XA_BRANCH_FLAG_LAST = 0x0002
IIAPI_XA_BRANCH_FLAG_NOOP = 0x0000
IIAPI_XA_FAIL = 0x20000000
IIAPI_XA_HEURCOM = 7
IIAPI_XA_HEURHAZ = 8
IIAPI_XA_HEURMIX = 5
IIAPI_XA_HEURRB = 6
IIAPI_XA_JOIN = 0x00200000
IIAPI_XA_MAXBQUALSIZE = 64
IIAPI_XA_MAXGTRIDSIZE = 64
IIAPI_XA_NOMIGRATE = 9
IIAPI_XA_RBCOMMFAIL = 101
IIAPI_XA_RBDEADLOCK = 102
IIAPI_XA_RBINTEGRITY = 103
IIAPI_XA_RBOTHER = 104
IIAPI_XA_RBPROTO = 105
IIAPI_XA_RBROLLBACK = 100
IIAPI_XA_RBTIMEOUT = 106
IIAPI_XA_RBTRANSIENT = 107
IIAPI_XA_RDONLY = 3
IIAPI_XA_RETRY = 4
IIAPI_XA_XIDDATASIZE = IIAPI_XA_MAXGTRIDSIZE + IIAPI_XA_MAXBQUALSIZE

IIAPI_XAER_ASYNC = -2
IIAPI_XAER_DUPID = -8
IIAPI_XAER_INVAL = -5
IIAPI_XAER_NOTA = -4
IIAPI_XAER_OUTSIDE = -9
IIAPI_XAER_PROTO = -6
IIAPI_XAER_RMERR = -3
IIAPI_XAER_RMFAIL = -7

II_SQLSTATE_LEN = 5
II_SS00000_SUCCESS = '00000'
II_SS01000_WARNING = '01000'
II_SS01001_CURS_OPER_CONFLICT = '01001'
II_SS01002_DISCONNECT_ERROR = '01002'
II_SS01003_NULL_ELIM_IN_SETFUNC = '01003'
II_SS01004_STRING_RIGHT_TRUNC = '01004'
II_SS01005_INSUF_DESCR_AREAS = '01005'
II_SS01006_PRIV_NOT_REVOKED = '01006'
II_SS01007_PRIV_NOT_GRANTED = '01007'
II_SS01008_IMP_ZERO_BIT_PADDING = '01008'
II_SS01009_SEARCH_COND_TOO_LONG = '01009'
II_SS0100A_QRY_EXPR_TOO_LONG = '0100A'
II_SS01500_LDB_TBL_NOT_DROPPED = '01500'
II_SS01501_NO_WHERE_CLAUSE = '01501'
II_SS02000_NO_DATA = '02000'
II_SS07000_DSQL_ERROR = '07000'
II_SS07001_USING_PARM_MISMATCH = '07001'
II_SS07002_USING_TARG_MISMATCH = '07002'
II_SS07003_CAN_EXEC_CURS_SPEC = '07003'
II_SS07004_NEED_USING_FOR_PARMS = '07004'
II_SS07005_STMT_NOT_CURS_SPEC = '07005'
II_SS07006_RESTR_DT_ATTR_ERR = '07006'
II_SS07007_NEED_USING_FOR_RES = '07007'
II_SS07008_INV_DESCR_CNT = '07008'
II_SS07009_INV_DESCR_IDX = '07009'
II_SS07500_CONTEXT_MISMATCH = '07500'
II_SS08000_CONNECTION_EXCEPTION = '08000'
II_SS08001_CANT_GET_CONNECTION = '08001'
II_SS08002_CONNECT_NAME_IN_USE = '08002'
II_SS08003_NO_CONNECTION = '08003'
II_SS08004_CONNECTION_REJECTED = '08004'
II_SS08006_CONNECTION_FAILURE = '08006'
II_SS08007_XACT_RES_UNKNOWN = '08007'
II_SS08500_LDB_UNAVAILABLE = '08500'
II_SS0A000_FEATUR_NOT_SUPPORTED = '0A000'
II_SS0A001_MULT_SERVER_XACTS = '0A001'
II_SS0A500_INVALID_QRY_LANG = '0A500'
II_SS21000_CARD_VIOLATION = '21000'
II_SS22000_DATA_EXCEPTION = '22000'
II_SS22001_STRING_RIGHT_TRUNC = '22001'
II_SS22002_NULLVAL_NO_IND_PARAM = '22002'
II_SS22003_NUM_VAL_OUT_OF_RANGE = '22003'
II_SS22005_ASSIGNMENT_ERROR = '22005'
II_SS22007_INV_DATETIME_FMT = '22007'
II_SS22008_DATETIME_FLD_OVFLOW = '22008'
II_SS22009_INV_TZ_DISPL_VAL = '22009'
II_SS22011_SUBSTRING_ERROR = '22011'
II_SS22012_DIVISION_BY_ZERO = '22012'
II_SS22015_INTERVAL_FLD_OVFLOW = '22015'
II_SS22018_INV_VAL_FOR_CAST = '22018'
II_SS22019_INV_ESCAPE_CHAR = '22019'
II_SS22021_CHAR_NOT_IN_RPRTR = '22021'
II_SS22022_INDICATOR_OVFLOW = '22022'
II_SS22023_INV_PARAM_VAL = '22023'
II_SS22024_UNTERM_C_STRING = '22024'
II_SS22025_INV_ESCAPE_SEQ = '22025'
II_SS22026_STRING_LEN_MISMATCH = '22026'
II_SS22027_TRIM_ERROR = '22027'
II_SS22500_INVALID_DATA_TYPE = '22500'
II_SS23000_CONSTR_VIOLATION = '23000'
II_SS23501_UNIQUE_CONS_VIOLATION = '23501'
II_SS24000_INV_CURS_STATE = '24000'
II_SS25000_INV_XACT_STATE = '25000'
II_SS26000_INV_SQL_STMT_NAME = '26000'
II_SS27000_TRIG_DATA_CHNG_ERR = '27000'
II_SS28000_INV_AUTH_SPEC = '28000'
II_SS2A500_TBL_NOT_FOUND = '2A500'
II_SS2A501_COL_NOT_FOUND = '2A501'
II_SS2A502_DUPL_OBJECT = '2A502'
II_SS2A503_INSUF_PRIV = '2A503'
II_SS2A504_UNKNOWN_CURSOR = '2A504'
II_SS2A505_OBJ_NOT_FOUND = '2A505'
II_SS2A506_INVALID_IDENTIFIER = '2A506'
II_SS2A507_RESERVED_IDENTIFIER = '2A507'
II_SS2B000_DEP_PRIV_EXISTS = '2B000'
II_SS2C000_INV_CH_SET_NAME = '2C000'
II_SS2D000_INV_XACT_TERMINATION = '2D000'
II_SS2E000_INV_CONN_NAME = '2E000'
II_SS33000_INV_SQL_DESCR_NAME = '33000'
II_SS34000_INV_CURS_NAME = '34000'
II_SS35000_INV_COND_NUM = '35000'
II_SS37500_TBL_NOT_FOUND = '37500'
II_SS37501_COL_NOT_FOUND = '37501'
II_SS37502_DUPL_OBJECT = '37502'
II_SS37503_INSUF_PRIV = '37503'
II_SS37504_UNKNOWN_CURSOR = '37504'
II_SS37505_OBJ_NOT_FOUND = '37505'
II_SS37506_INVALID_IDENTIFIER = '37506'
II_SS37507_RESERVED_IDENTIFIER = '37507'
II_SS3C000_AMBIG_CURS_NAME = '3C000'
II_SS3D000_INV_CAT_NAME = '3D000'
II_SS3F000_INV_SCHEMA_NAME = '3F000'
II_SS40000_XACT_ROLLBACK = '40000'
II_SS40001_SERIALIZATION_FAIL = '40001'
II_SS40002_CONSTR_VIOLATION = '40002'
II_SS40003_STMT_COMPL_UNKNOWN = '40003'
II_SS42000_SYN_OR_ACCESSERR = '42000'
II_SS42500_TBL_NOT_FOUND = '42500'
II_SS42501_COL_NOT_FOUND = '42501'
II_SS42502_DUPL_OBJECT = '42502'
II_SS42503_INSUF_PRIV = '42503'
II_SS42504_UNKNOWN_CURSOR = '42504'
II_SS42505_OBJ_NOT_FOUND = '42505'
II_SS42506_INVALID_IDENTIFIER = '42506'
II_SS42507_RESERVED_IDENTIFIER = '42507'
II_SS44000_CHECK_OPTION_ERR = '44000'
II_SS50000_MISC_ING_ERRORS = '50000'
II_SS50001_INVALID_DUP_ROW = '50001'
II_SS50002_LIMIT_EXCEEDED = '50002'
II_SS50003_EXHAUSTED_RESOURCE = '50003'
II_SS50004_SYS_CONFIG_ERROR = '50004'
II_SS50005_GW_ERROR = '50005'
II_SS50006_FATAL_ERROR = '50006'
II_SS50007_INVALID_SQL_STMT_ID = '50007'
II_SS50008_UNSUPPORTED_STMT = '50008'
II_SS50009_ERROR_RAISED_IN_DBPROC = '50009'
II_SS5000A_QUERY_ERROR = '5000A'
II_SS5000B_INTERNAL_ERROR = '5000B'
II_SS5000C_FETCH_ORIENTATION = '5000C'
II_SS5000D_INVALID_CURSOR_NAME = '5000D'
II_SS5000E_DUP_STMT_ID = '5000E'
II_SS5000F_TEXTUAL_INFO = '5000F'
II_SS5000G_DBPROC_MESSAGE = '5000G'
II_SS5000H_UNAVAILABLE_RESOURCE = '5000H'
II_SS5000I_UNEXP_LDB_SCHEMA_CHNG = '5000I'
II_SS5000J_INCONSISTENT_DBMS_CAT = '5000J'
II_SS5000K_SQLSTATE_UNAVAILABLE = '5000K'
II_SS5000L_PROTOCOL_ERROR = '5000L'
II_SS5000M_IPC_ERROR = '5000M'
II_SS5000N_OPERAND_TYPE_MISMATCH = '5000N'
II_SS5000O_INVALID_FUNC_ARG_TYPE = '5000O'
II_SS5000P_TIMEOUT_ON_LOCK_REQUEST = '5000P'
II_SS5000Q_DB_REORG_INVALIDATED_QP = '5000Q'
II_SS5000R_RUN_TIME_LOGICAL_ERROR = '5000R'
II_SSHZ000_RDA = 'HZ000'
