skip to main content
SQL Engine parse tree methods for Java : damex_addxxxColValToRow
 

damex_addxxxColValToRow

This method is used to build up a row by adding values for columns of the tables involved in the query. NULL data is added by specifying the XO_NULL_DATA value flag for the value length.
This method copies data from the user-supplied buffer to its internal buffers. Therefore, the IP can free the memory associated with the input buffer (colVal).
These are the data type specific methods for Java:
int damex_addBigIntColValToRow(
    long hstmt,
    long hRow,
    long hCol,
    long colVal,
    int  lColValLen)

int damex_addBinaryColValToRow(
    long   hstmt,
    long   hRow,
    long   hCol,
    byte[] colVal,
    int    lColValLen)
int damex_addBitColValToRow(
    long    hstmt,
    long    hRow,
    long    hCol,
    boolean colVal,
    int     lColValLen)

int damex_addCharColValToRow(
    long   hstmt,
    long   Row,
    long   hCol,
    String colVal,
    int    lColValLen)

int damex_addDoubleColValToRow(
    long   hstmt,
    long   hRow,
    long   hCol,
    double colVal,
    int    lColValLen)

int damex_addFloatColValToRow(
    long  hstmt,
    long  hRow,
    long  hCol,
    float colVal,
    int   lColValLen)

int damex_addIntColValToRow(
    long hstmt,
    long hRow,
    long hCol,
    int  colVal,
    int  lColValLen)

int damex_addShortColValToRow(
    long  hstmt,
    long  hRow,
    long  hCol,
    short colVal,
    int   lColValLen)

int damex_addTimeStampColValToRow(
    long  hstmt,
    long  hRow,
    long  hCol,
    xo_tm colVal,
    int   lColValLen)

int damex_addTinyIntColValToRow(
    long hstmt,
    long hRow,
    long hCol,
    byte colVal,
    int  lColValLen)

int damex_addWCharColValToRow(
    long   hstmt,
    long   hRow,
    long   hCol,
    String colVal,
    int    lColValLen)
Table 246. Parameters for damex_addxxxColValToRow
Parameter
Type
Description
INPUT
hstmt
long
The statement handle.
hRow
long
The row handle.
hCol
long
The column handle.
colVal
depends on the method used
The Java type of the data should correspond to the iXoType value. See Table 34.
lColValLen
Int
The length of the data:XO_NULL_DATA - indicates a null value,For VARCHAR, CHAR and NUMERIC either the number of characters or XO_NTS to add the entire string.For all other data types, 0 or any value other than XO_NULL_DATA.
RETURN
int
DAM_SUCCESS - added the value to the row,DAM_FAILURE - error adding the value.