getArrayInfo()
public ArrayTypeInfo getArrayInfo()
Retrieves all Array type related information and returns it in the ArrayTypeInfo object. The ArrayTypeInfo class corresponds to the array_info_eon_t structure used by C FNC functions. This structure contains information about the dimensions of the array, the number of elements, and information about each element. For information about the array_info_eon_t structure, see the sqltypes_td.h header file.
getArrayNumDimension()
int getArrayNumDimension() throws SQLException
Retrieves the number of dimensions for an Array/Varray type. This method is not applicable to any other UDT or complex types.
The method returns a constant of type int that contains the number of dimensions of this Array/Varray type.
The method throws SQLException if an error occurs while attempting to access the dimensions information. A database specific code “9744 (ERRUDFJAVUDT) < Number of dimensions for Array/Varray could not be accessed>” is returned.
getBaseCharset()
int getBaseCharset() throws SQLException
Retrieves the character set for the UDT or complex type, if applicable to its base type.
The method returns a constant of type int that contains the charset value.
The method throws SQLException if an error occurs while attempting to access the charset value. A database specific code “9744 (ERRUDFJAVUDT) <UDT charset could not be accessed>” is returned.
getBaseDataType()
TeradataType getBaseDataType() throws SQLException
Retrieves the base data type information for the UDT or complex type. Valid values include those contained in the Java enum TeradataType.
The method returns a member of the enum TeradataType that matches the base type of this UDT or complex type.
The method throws SQLException if an error occurs while attempting to access the base data type. A database specific code “9744 (ERRUDFJAVUDT) <UDT base type could not be accessed>” is returned.
getBaseMaxLength()
int getBaseMaxLength() throws SQLException
Retrieves the maximum length for the base type of the UDT or complex type.
The method returns a constant of type int that contains the base maximum length value for the UDT or complex type.
The method throws SQLException if an error occurs while attempting to access the base maximum length. A database specific code “9744 (ERRUDFJAVUDT) <UDT base max length could not be accessed >” is returned.
getBaseNumFractionalDigits()
short getBaseNumFractionalDigits() throws SQLException
Retrieves the fractional digits value for the base type of the UDT or complex type. This value corresponds to the value n in a DECIMAL(m,n) base type; otherwise it is set to zero.
The method returns a constant of type short that contains the fractional digits value.
The method throws SQLException if an error occurs while attempting to access the total interval digits value. A database specific code “9744 (ERRUDFJAVUDT) <UDT base fractional digits could not be accessed >” is returned.
getBasePrecision()
int getBasePrecision() throws SQLException
Retrieves the precision for the base type of the UDT or complex type. This value corresponds to the precision for time or timestamp types; for example TIME(4) or TIMESTAMP(6), otherwise it is set to zero.
The method returns a constant of type int that contains the precision value.
The method throws SQLException if an error occurs while attempting to access the precision value. A database specific code “9744 (ERRUDFJAVUDT) <UDT base precision could not be accessed>” is returned.
getBaseTotalIntervalDigits()
short getBaseTotalIntervalDigits() throws SQLException
Retrieves the total interval digits for the base type of the UDT or complex type. This value corresponds to the value m in a DECIMAL(m,n) base type; otherwise it is set to zero.
The method returns a constant of type short that contains the total interval digits value.
The method throws SQLException if an error occurs while attempting to access the total interval digits value. A database specific code “9744 (ERRUDFJAVUDT) <UDT base total interval digits could not be accessed>” is returned.
getJSONStorageFormat()
short getJSONStorageFormat() throws SQLException
Retrieves the JSON storage format for a JSON column. Valid values match those used for the C structure json_storage_en. For information about this structure, see Table Operator Data Structures.
The method returns a constant of type short that contains the JSON storage format value corresponding to this JSON column.
The method throws SQLException if an error occurs while attempting to access the JSON storage format value. A database specific code “9744 (ERRUDFJAVUDT) <JSON Storage format could not be accessed>” is returned.
getStructNumAttributes()
int getStructNumAttributes() throws SQLException
Retrieves the number of total attributes for a structured UDT. This method is not applicable to any other UDT or complex types.
The method returns a constant of type int that contains the number of attributes for this structured UDT.
The method throws SQLException if an error occurs while attempting to access the number of attributes of the structured UDT. A database specific code “9744 (ERRUDFJAVUDT) <Structured UDT number of attributes could not be accessed>” is returned.
getTransform Methods
- int getTransformCharset()
- int getTransformFractionalDigits()
- int getTransformIntervalRange()
- int getTransformMaxLength()
- int getTransformPrecision()
- int getTransformTotalDigits()
- TeradataType getTransformType()
These methods are similar to the getBase type methods but refer to the default transform type of the UDT.
getUdtIndicator()
short getUdtIndicator() throws SQLException
Retrieves the UDT indicator attribute for the UDT or CDT.
Valid values match those used for the udt_indicator attribute of the C structure UDT_BaseInfo_t. For information about this structure, see Table Operator Data Structures.
The method returns a constant of type short that contains the indicator value corresponding to this UDT or CDT.
The method throws SQLException if an error occurs while attempting to access the indicator value. A database specific code “9744 (ERRUDFJAVUDT) <UDT indicator could not be accessed>” is returned.
getUdtName()
java.lang.String getUdtName() throws SQLException
Retrieves the name for a UDT or complex type.
The method returns a constant of type java.lang.String that contains the name of the UDT.
The method throws SQLException if an error occurs while attempting to access the udtName. A database specific code “9744 (ERRUDFJAVUDT) <UDT name could not be accessed>” is returned.
setArrayInfo(ArrayTypeInfo)
public void setArrayInfo(ArrayTypeInfo a)
Sets the Array metadata information for a column. The information that is set includes the dimensions of the array, the number of elements, and information about each element.
setArrayNumDimension(int)
void setArrayNumDimension(int num)
throws SQLException
Sets the number of dimensions for an Array/Varray type. This method is not applicable to any other UDT or complex types.
The method throws SQLException if an error occurs while attempting to set the number of dimensions for an Array/Varray type. A database specific code “9744 (ERRUDFJAVUDT) <Number of dimensions for Array/Varray could not be set>” is returned.
setBaseCharset(int)
void setBaseCharset(int charset)
throws SQLException
Sets the character set for the UDT or complex type, if applicable to its base type.
The method throws SQLException if an error occurs while attempting to set the charset. A database specific code “9744 (ERRUDFJAVUDT) <UDT Charset could not be set>” is returned.
setBaseDataType(TeradataType)
void setBaseDataType(TeradataType baseDataType)
throws SQLException
Sets the base data type information for the UDT or complex type. Valid values include those contained in the Java enum TeradataType.
The method throws SQLException if an error occurs while attempting to set the base data type. A database specific code “9744 (ERRUDFJAVUDT) <UDT base type could not be set>” is returned.
setBaseMaxLength(int)
void setBaseMaxLength(int maxLength)
throws SQLException
Sets the maximum length for the base type of the UDT or complex type.
The method throws SQLException if an error occurs while attempting to set the base maximum length. A database specific code “9744 (ERRUDFJAVUDT) <UDT base max length could not be set>” is returned.
setBaseNumFractionalDigits(short)
void setBaseNumFractionalDigits(short numFractionalDigits)
throws SQLException
Sets the fractional digits value for the base type of the UDT or complex type. This value corresponds to the value n in a DECIMAL(m,n) base type; otherwise it is set to zero.
The method throws SQLException if an error occurs while attempting to set the fractional digits value. A database specific code “9744 (ERRUDFJAVUDT) <UDT base fractional digits could not be set>” is returned.
setBasePrecision(int)
void setBasePrecision(int precision)
throws SQLException
Sets the precision for the base type of the UDT or complex type. This value corresponds to the precision for time or timestamp types; for example TIME(4) or TIMESTAMP(6), otherwise it is set to zero.
The method throws SQLException if an error occurs while attempting to set the precision value. A database specific code “9744 (ERRUDFJAVUDT) <UDT base precision could not be set>” is returned.
setBaseTotalIntervalDigits(short)
void setBaseTotalIntervalDigits(short totalIntervalDigits)
throws SQLException
Sets the total interval digits for the base type of the UDT or complex type. This value corresponds to the value m in a DECIMAL(m,n) base type; otherwise it is set to zero.
The method throws SQLException if an error occurs while attempting to set the total interval digits value. A database specific code “9744 (ERRUDFJAVUDT) <UDT base total interval digits could not be set>” is returned.
setJSONStorageFormat(short)
void setJSONStorageFormat(short indicator)
throws SQLException
Sets the JSON storage format for a JSON column. Valid values match those used for the C structure json_storage_en. For information about this structure, see Table Operator Data Structures.
The method throws SQLException if an error occurs while attempting to set the JSON storage format value. A database specific code “9744 (ERRUDFJAVUDT) <JSON Storage Format could not be set>” is returned.
setStructNumAttributes(int)
void setStructNumAttributes(int structNumAttributes)
throws SQLException
Sets the number of total attributes for a structured UDT. This method is not applicable to any other UDT or complex types.
The method throws SQLException if an error occurs while attempting to set the number of attributes of the structured UDT. A database specific code “9744 (ERRUDFJAVUDT) <Structured UDT number of attributes could not be set>” is returned.
setTransform Methods
- void setTransformCharset(int c)
- void setTransformFractionalDigits(int d)
- void setTransformIntervalRange(int d)
- void setTransformMaxLength(int len)
- void setTransformPrecision(int p)
- void setTransformTotalDigits(int d)
- void setTransformType(TeradataType type)
These methods are similar to the setBase type methods but refer to the default transform type of the UDT.
setUdtIndicator(short)
void setUdtIndicator(short indicator)
throws SQLException
Sets the UDT indicator attribute for the UDT or CDT.
Valid values match those used for the udt_indicator attribute of the C structure UDT_BaseInfo_t. For information about this structure, see Table Operator Data Structures.
This method throws SQLException if an error occurs while attempting to set the indicator value. A database specific code “9744 (ERRUDFJAVUDT) <UDT indicator could not be set>” is returned.
setUdtName(java.lang.String)
void setUdtName(java.lang.String udtName)
throws SQLException
Sets the name for a UDT or complex type.
The method throws SQLException if an error occurs while attempting to set the udtName. A database specific code “9744 (ERRUDFJAVUDT) <UDT name could not be set>” is returned.