I have following IDL .
union ColumnValue {
     1: bool   bool_val       // BOOLEAN
     2: byte   byte_val       // TINYINT
     3: i16    i16_val        // SMALLINT
     4: i32    i32_val        // INT
     5: i64    i64_val        // BIGINT, TIMESTAMP
     6: double double_val     // FLOAT, DOUBLE
     7: string string_val     // CHAR, VARCHAR
     8: binary binary_val     // BINARY
     9: BlobLocator blob_val  // BLOB
    10: ClobLocator clob_val  // CLOB
}

Server is implemented in Java. When I send values from Java and Perl ,
Server understand it correctly. But from c++ it is not working
This is how I am sending the value
{{{
ColumnValue cv1 ;
cv1.i32_val = id % 98;
cvList.push_back(cv1);

ColumnValue cv2 ;
cv2.i32_val = id;
cvList.push_back(cv2);
}}}

my Api takes list of ColumnValue

On Java Side I am doing following


if (cv.isSetBool_val()) {
}
else if (cv.isSetByte_val()) {
}
else if (cv.isSetI16_val()) {
}
else if (cv.isSetI32_val()) {
}
else if (cv.isSetI64_val()) {
}
else {
   throwException.
}

Reply via email to