Previous Topic

Next Topic

OpenAPI Data Structures

The OpenAPI data structures are described in the following sections.

Previous Topic

Next Topic

IIAPI_COPYMAP Data Type—Provide Information on How to Execute the SQL Copy Statement

The IIAPI_COPYMAP data type provides information needed to execute the copy statement, including the copy file name, log file name, number of columns in a row, and a description of the data.

This data type has the following syntax:

typedef struct _IIAPI_COPYMAP
{
       II_BOOL                     cp_copyFrom;
       II_ULONG                    cp_flags;
       II_LONG                     cp_errorCount;
       II_CHAR II_FAR              *cp_fileName;
       II_CHAR II_FAR              *cp_logName;
       II_INT2                     cp_dbmsCount;
       IIAPI_DESCRIPTOR II_FAR     *cp_dbmsDescr;
       II_INT2                     cp_fileCount;
       IIAPI_FDATADESCR II_FAR     *cp_fileDescr;
} IIAPI_COPYMAP;

This data type has the following parameters:

Previous Topic

Next Topic

IIAPI_DATAVALUE Data Type—Provide Value for OpenAPI Data

The IIAPI_DATAVALUE data type contains the value for OpenAPI data. If the value is unavailable, this data type contains a NULL value and the dv_null parameter is TRUE.

This data type has the following syntax:

typedef struct _IIAPI_DATAVALUE
{
       II_BOOL         dv_null;
       II_UINT2        dv_length;
       II_PTR          dv_value;
} IIAPI_DATAVALUE;

This data type has the following parameters:

Previous Topic

Next Topic

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:

Previous Topic

Next Topic

IIAPI_FDATADESCR Data Type—Describe Column Data in a Copy File

This data type describes the data in a copy file. It also describes how the file should be formatted.

This data type has the following syntax:

typedef struct _IIAPI_FDATADESCR
{
       II_CHAR *fd_name;
       II_INT2 fd_type;
       II_INT2 fd_length;
       II_INT2 fd_prec;
       II_LONG fd_column;
       II_LONG fd_funcID;
       II_LONG fd_cvLen;
       II_LONG fd_cvPrec;
       II_BOOL fd_delimiter;
       II_INT2 fd_delimLength;
       II_CHAR *fd_delimValue;
       II_BOOL fd_nullable;
       II_BOOL fd_nullInfo;
       IIAPI_DESCRIPTOR fd_nullDescr;
IIAPI_DATAVALUE fd_nullValue;
} IIAPI_FDATADESCR;

This data type has the following parameters:

Previous Topic

Next Topic

IIAPI_II_DIS_TRAN_ID Data Type—Identify Distributed Ingres Transaction ID

The IIAPI_II_DIS_TRAN_ID data type specifies and names a distributed Ingres transaction.

This data type has the following syntax:

typedef struct _IIAPI_II_DIS_TRAN_ID
{
        IIAPI_II_TRAN_ID   ii_tranID;
        II_CHAR            ii_tranName[IIAPI_TRAN_MAXNAME];
} IIAPI_II_DIS_TRAN_ID;

This data type has the following parameters:

Previous Topic

Next Topic

IIAPI_II_TRAN_ID Data Type—Identify Local Ingres Transaction ID

The IIAPI_II_TRAN_ID data type specifies a local Ingres transaction ID.

This data type has the following syntax:

typedef struct _IIAPI_II_TRAN_ID
{
        II_UINT4      it_highTran;
        II_UINT4      it_lowTran;
} IIAPI_II_TRAN_ID;

This data type has the following parameters:

Previous Topic

Next Topic

IIAPI_SVR_ERRINFO Data Type—Describe Additional Server Information Associated with Error Messages

The IIAPI_SVR_ERRINFO data type contains additional server-specific information that was received along with an error, warning, or user message.

This data type has the following syntax:

typedef struct _IIAPI_SVR_ERRINFO
{
       II_LONG svr_id_error;
       II_LONG svr_local_error;
       II_LONG svr_id_server;
       II_LONG svr_server_type;
       II_LONG svr_severity;
       II_INT2 svr_parmCount;
       II_API_DESCRIPTOR *svr_parmDescr;
       II_API_DATAVALUE *svr_parmValue;
} IIAPI_SVR_ERRINFO;

This data type has the following parameters:

Previous Topic

Next Topic

IIAPI_TRAN_ID Data Type—Identify an OpenAPI Transaction

The IIAPI_TRAN_ID data type specifies and names an OpenAPI transaction. OpenAPI supports Ingres transaction management. The union in this data type will increase as more transaction managers are supported.

This data type has the following syntax:

typedef struct _IIAPI_TRAN_ID
{
       II_ULONG                          ti_type;
       union
       {
              IIAPI_II_DIS_TRAN_ID       iiXID;
              IIAPI_XA_DIS_TRAN_ID       xaXID;
       } ti_value;
} IIAPI_TRAN_ID;

This data type has the following parameters:

Previous Topic

Next Topic

IIAPI_XA_DIS_TRAN_ID Data Type—Identify a Distributed XA Transaction ID

The IIAPI_XA_DIS_TRAN_ID datatype specifies a distributed XA transaction ID.

This data type has the following syntax:

typedef struct _IIAPI_XA_DIS_TRAN_ID
{
       IIAPI_XA_TRAN_ID     xa_tranID;
       II_INT4              xa_branchSeqnum;
       II_INT4              xa_branchFlag;
} IIAPI_XA_DIS_TRAN_ID;

This data type has the following parameters:

Previous Topic

Next Topic

IIAPI_XA_TRAN_ID Data Type—Identify an XA Transaction ID

The IIAPI_XA_TRAN_ID datatype specifies an XA transaction ID.

This data type has the following syntax:

typedef struct _IIAPI_XA_TRAN_ID
{
       II_LONG       xt_formatID;
       II_LONG       xt_gtridLength;
       II_LONG       xt_bqualLength;
       II_CHAR       xt_data[128];
} IIAPI_XA_TRAN_ID;

This data type has the following parameters:


© 2007 Ingres Corporation. All rights reserved.