java.lang.Object
org.apache.arrow.adapter.jdbc.JdbcFieldInfo
This class represents the information about a JDBC ResultSet Field that is needed to construct an
 
ArrowType. Currently, this is:
 - The JDBC Typestype.
- The nullability.
- The field's precision (used for Types.DECIMALandTypes.NUMERICtypes).
- The field's scale (used for Types.DECIMALandTypes.NUMERICtypes).
- 
Constructor SummaryConstructorsConstructorDescriptionJdbcFieldInfo(int jdbcType) Builds aJdbcFieldInfousing only theTypestype.JdbcFieldInfo(int jdbcType, int precision, int scale) Builds aJdbcFieldInfofrom theTypestype, precision, and scale.JdbcFieldInfo(int jdbcType, int nullability, int precision, int scale) Builds aJdbcFieldInfofrom theTypestype, nullability, precision, and scale.Builds aJdbcFieldInfofrom the corresponding row from aDatabaseMetaData.getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String)ResultSet.JdbcFieldInfo(ResultSetMetaData rsmd, int column) Builds aJdbcFieldInfofrom the correspondingResultSetMetaDatacolumn.
- 
Method SummaryModifier and TypeMethodDescriptionintThe column index for query column.intThe max number of characters for the column.intTheTypestype.intThe numeric precision, forTypes.NUMERICandTypes.DECIMALtypes.intgetScale()The numeric scale, forTypes.NUMERICandTypes.DECIMALtypes.The type name as reported by the database.intThe nullability.
- 
Constructor Details- 
JdbcFieldInfopublic JdbcFieldInfo(int jdbcType) Builds aJdbcFieldInfousing only theTypestype. Do not use this constructor if the field type isTypes.DECIMALorTypes.NUMERIC; the precision and scale will be set to0.- Parameters:
- jdbcType- The- Typestype.
- Throws:
- IllegalArgumentException- if jdbcType is- Types.DECIMALor- Types.NUMERIC.
 
- 
JdbcFieldInfopublic JdbcFieldInfo(int jdbcType, int precision, int scale) Builds aJdbcFieldInfofrom theTypestype, precision, and scale. Use this constructor forTypes.DECIMALandTypes.NUMERICtypes.- Parameters:
- jdbcType- The- Typestype.
- precision- The field's numeric precision.
- scale- The field's numeric scale.
 
- 
JdbcFieldInfopublic JdbcFieldInfo(int jdbcType, int nullability, int precision, int scale) Builds aJdbcFieldInfofrom theTypestype, nullability, precision, and scale.- Parameters:
- jdbcType- The- Typestype.
- nullability- The nullability. Must be one of- ResultSetMetaData.columnNoNulls,- ResultSetMetaData.columnNullable, or- ResultSetMetaData.columnNullableUnknown.
- precision- The field's numeric precision.
- scale- The field's numeric scale.
 
- 
JdbcFieldInfoBuilds aJdbcFieldInfofrom the correspondingResultSetMetaDatacolumn.- Parameters:
- rsmd- The- ResultSetMetaDatato get the field information from.
- column- The column to get the field information for (on a 1-based index).
- Throws:
- SQLException- If the column information cannot be retrieved.
- NullPointerException- if- rsmdis- null.
- IllegalArgumentException- if- columnis out of bounds.
 
- 
JdbcFieldInfoBuilds aJdbcFieldInfofrom the corresponding row from aDatabaseMetaData.getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String)ResultSet.- Parameters:
- rs- The- ResultSetto get the field information from.
- Throws:
- SQLException- If the column information cannot be retrieved.
 
 
- 
- 
Method Details- 
getJdbcTypepublic int getJdbcType()TheTypestype.
- 
isNullablepublic int isNullable()The nullability.
- 
getPrecisionpublic int getPrecision()The numeric precision, forTypes.NUMERICandTypes.DECIMALtypes.
- 
getScalepublic int getScale()The numeric scale, forTypes.NUMERICandTypes.DECIMALtypes.
- 
getColumnpublic int getColumn()The column index for query column.
- 
getTypeNameThe type name as reported by the database.
- 
getDisplaySizepublic int getDisplaySize()The max number of characters for the column.
 
-