Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 



cci_get_data

Description

The cci_get_data function gets the col_noth value from the currently fetched result. The type of the value variable is determined according to the given type parameter, and the value or the pointer is copied to the value variable accordingly.

For a value to be copied, the memory for the address to be transferred to the value variable must have been previously assigned. Note that if a pointer is copied, a pointer in the application client library is returned, so the value becomes invalid next time the cci_get_data() function is called.

In addition, the pointer returned by the pointer copy must not be freed. However, if the type is CCI_A_TYPE_SET, the memory must be freed by using the cci_set_free() function after using the set because the set is returned after the T_CCI_SET type memory is allocated. The following table shows the summary of type parameters and data types of their corresponding values.

type

value Type

Meaning

CCI_A_TYPE_STR

char**

pointer copy

CCI_A_TYPE_INT

int*

value copy

CCI_A_TYPE_FLOAT

float*

value copy

CCI_A_TYPE_DOUBLE

double*

value copy

CCI_A_TYPE_BIT

T_CCI_BIT*

value copy (pointer copy for each member)

CCI_A_TYPE_SET

T_CCI_SET*

memory alloc and value copy

CCI_A_TYPE_DATE

T_CCI_DATE*

value copy

CCI_A_TYPE_BIGINT

int64_t*
(For Windows : __int64*)

value copy

CCI_A_TYPE_BLOB

T_CCI_BLOB

memory alloc and value copy

CCI_A_TYPE_CLOB

T_CCI_CLOB

memory alloc and value copy

Syntax

int cci_get_data(int req_handle, int col_no, int type, void *value, int *indicator)

  • req_handle : (IN) Request handle
  • col_no : (IN) One-based column index. It starts with 1.
  • type : (IN) Data type (defined in the T_CCI_A_TYPE) of value variable
  • value : (OUT) Variable address for data to be stored
  • indicator : (OUT) NULL indicator ( -1 : NULL)
    • if type is CCI_A_TYPE_STR : -1 is returned in case of NULL; the length of character string stored in value is returned, otherwise.
    • if type is CCI_A_TYPE_STR : -1 is returned in case of NULL, 0 is returned, otherwise.
Return Value
  • Error code (0 : success)
Error Codes
  • CCI_ER_REQ_HANDLE
  • CCI_ER_TYPE_CONVERSION
  • CCI_ER_COLUMN_INDEX
  • CCI_ER_ATYPE
Remark
  • For LOB type, if the cci_get_data() function is called, meta data with the LOB type column (Locator) is displayed. To call data of the LOB type column, the cci_blob_read() function should be called.