skip to main content
OpenAccess SDK SQL Engine core methods for Java : Exchanging data : dam_describeColDetail
 

dam_describeColDetail

This method is used to retrieve the details of the specified column. Pass in NULL for any attributes that you do not want. The IP uses this method to:
*Retrieve data type details - get the exact scale, precision, radix, length and other attributes associated with a column.
*Retrieve user data - get the user data that is optionally stored for each column in the schema.
xo_type dam_describeColDetail(
long         hcol,
xo_int       piPseudoColumn,
xo_int       piColumnType,
xo_int       piSortOrder,
xo_int       piFunctionType,
xo_int       piIndexType,
StringBuffer pUserData)
Table 139. Parameters for dam_describeColDetail
Parameter
Type
Description
INPUT
hcol
long
The column handle.
OUTPUT
piPseudoColumn
xo_int
Indicates if the column is marked as a PSEUDO column in which case the user is not allowed to insert or update its value. The output will be one of the following:
SQL_PC_UNKNOWN - not set.
SQL_PC_NOT_PSEUDO - the column is not a PSEUDO column and should be treated like a normal user column.
SQL_PC_PSEUDO - if the column is a PSEUDO column.
piColumnType
xo_int
If the column has been marked as a SQL_PC_PSEUDO to indicate it is a pseudo column, then this field indicates whether it is a ROWID or ROWVER.
DAM_NOT_SET - if column is not a pseudo column.
SQL_BEST_ROWID - the column is used to uniquely identify the row.
SQL_ROWVER - the column is used to track the version of the row.
pUserData
StringBuffer
User data as specified in the schema. Create and pass in a StringBuffer of DAM_MAX_ID_LEN+1.
RETURN
xo_type
Object of type xo_type detailing the precision, scale, length, radix, null attributes of the column as defined in the schema. See below for the xo_type definition.

xo_type

xo_type is an object with the following attributes:
*int type - Identifies the type of the column.
*int length - Contains the maximum length for a character data type.
*int prec - Contains the number of digits of mantissa precision.
*int scale - Total number of significant digits to the right of the decimal point.
*int radix - Radix of PREC if TYPE is one of the approximate numeric types.
*int null - Contains 0 (XO_NO_NULLS) if not nullable or 1 (XO_NULLABLE) if column is nullable.