Package com.exasol.adapter.jdbc
Class JDBCTypeDescription
- java.lang.Object
-
- com.exasol.adapter.jdbc.JDBCTypeDescription
-
public class JDBCTypeDescription extends Object
This class implements a parameter object describing attributes of a JDBC data type.The size of a type can differ from the octet length of that type if the data type uses multiple bytes to represent a character. This is for example the case for UTF encoding.
The original name helps distinguishing types that have the same identifier number but different meaning.
-
-
Constructor Summary
Constructors Constructor Description JDBCTypeDescription(int jdbcType, int decimalScale, int precisionOrSize, int byteSize, String typeName)Create a new instance of a JDBC data type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetByteSize()Storage size in eight-bit bytes (aka.intgetDecimalScale()Get the decimal scale.intgetJdbcType()Get the JDBC type identifier.intgetPrecisionOrSize()Get the precision for numeric types or size for size types (likeVARCHAR).StringgetTypeName()Get the original name of the data type.
-
-
-
Constructor Detail
-
JDBCTypeDescription
public JDBCTypeDescription(int jdbcType, int decimalScale, int precisionOrSize, int byteSize, String typeName)Create a new instance of a JDBC data type.- Parameters:
jdbcType- type identifier as presented by the JDBC driver of the databasedecimalScale- number of digits behind the pointprecisionOrSize- precision for numbers or size for size types (likeVARCHAR)byteSize- storage size the data type needs in bytestypeName- original name the type has in the database
-
-
Method Detail
-
getJdbcType
public int getJdbcType()
Get the JDBC type identifier.- Returns:
- type identifier as number
-
getDecimalScale
public int getDecimalScale()
Get the decimal scale.- Returns:
- decimal scale
-
getPrecisionOrSize
public int getPrecisionOrSize()
Get the precision for numeric types or size for size types (likeVARCHAR).- Returns:
- precision or size
-
getByteSize
public int getByteSize()
Storage size in eight-bit bytes (aka. octets).- Returns:
- size in bytes
-
getTypeName
public String getTypeName()
Get the original name of the data type.- Returns:
- original type name
-
-