Package org.kiwiproject.jdbc
Class KiwiJdbc
java.lang.Object
org.kiwiproject.jdbc.KiwiJdbc
JDBC utilities.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum representing options for trimming strings. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanbooleanFromInt(ResultSet rs, String columnName) Converts an int value in the specified column to a boolean.static booleanbooleanFromInt(ResultSet rs, String columnName, KiwiPrimitives.BooleanConversionOption option) Converts an int value in the specified column to a boolean using the givenKiwiPrimitives.BooleanConversionOption.static booleanbooleanFromLong(ResultSet rs, String columnName) Converts a long value in the specified column to a boolean.static booleanbooleanFromLong(ResultSet rs, String columnName, KiwiPrimitives.BooleanConversionOption option) Converts a long value in the specified column to a boolean using the givenKiwiPrimitives.BooleanConversionOption.static @Nullable DatedateFromTimestamp(ResultSet rs, String columnName) static @Nullable DatedateFromTimestamp(Timestamp timestamp) static @Nullable DoubledoubleValueOrNull(ResultSet rs, String columnName) Simplifies the JDBC silliness whereby getting a double value that is actuallynullreturns zero, and you have to check if the last value was actuallynullusing theResultSet.wasNull()method.enumValueOrEmpty(ResultSet rs, String columnName, Class<T> enumType) Returns an enum constant of the given type from the specified column in the result set.static <T extends Enum<T>>
@Nullable TenumValueOrNull(ResultSet rs, String columnName, Class<T> enumType) Returns an enum constant of the given type from the specified column in the result set.static longepochMillisFromTimestamp(ResultSet rs, String columnName) Convert the timestamp column given bycolumnNamein theResultSetto milliseconds from the epoch.static longepochMillisFromTimestamp(Timestamp timestamp) Convert the givenTimestampto milliseconds from the epoch.static @Nullable InstantinstantFromTimestamp(ResultSet rs, String columnName) static @Nullable InstantinstantFromTimestamp(Timestamp timestamp) static @Nullable IntegerintValueOrNull(ResultSet rs, String columnName) Simplifies the JDBC silliness whereby getting an int value that is actuallynullreturns zero, and you have to check if the last value was actuallynullusing theResultSet.wasNull()method.static @Nullable LocalDatelocalDateFromDateOrNull(@Nullable Date date) Returns aLocalDateTimefrom the givenDate.static @Nullable LocalDatelocalDateFromDateOrNull(ResultSet rs, String columnName) static @Nullable LocalDateTimelocalDateTimeFromTimestamp(ResultSet rs, String columnName) static @Nullable LocalDateTimelocalDateTimeFromTimestamp(Timestamp timestamp) Returns aLocalDateTimefrom the givenTimestamp.static @Nullable LonglongValueOrNull(ResultSet rs, String columnName) Simplifies the JDBC silliness whereby getting a long value that is actuallynullreturns zero, and you have to check if the last value was actuallynullusing theResultSet.wasNull()method.static voidnextOrThrow(ResultSet rs) Attempt to callResultSet.next()on the given ResultSet, and throw anIllegalStateExceptionif the result set was not advanced.static voidnextOrThrow(ResultSet rs, String message) Attempt to callResultSet.next()on the given ResultSet, and throw anIllegalStateExceptionif the result set was not advanced.static voidnextOrThrow(ResultSet rs, String messageTemplate, Object... args) Attempt to callResultSet.next()on the given ResultSet, and throw anIllegalStateExceptionif the result set was not advanced.static voidnullSafeSetDateAsTimestamp(PreparedStatement ps, int parameterIndex, Date value) Sets theDatevalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues.static voidnullSafeSetDateAsTimestamp(PreparedStatement ps, int parameterIndex, Date value, int type) Sets theDatevalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues.static voidnullSafeSetDouble(PreparedStatement ps, int parameterIndex, Double value) Sets theDoublevalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues.static voidnullSafeSetDouble(PreparedStatement ps, int parameterIndex, Double value, int type) Sets theDoublevalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues.static voidnullSafeSetInt(PreparedStatement ps, int parameterIndex, Integer value) Sets theIntegervalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues.static voidnullSafeSetInt(PreparedStatement ps, int parameterIndex, Integer value, int type) Sets theIntegervalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues.static voidnullSafeSetLong(PreparedStatement ps, int parameterIndex, Long value) Sets theLongvalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues.static voidnullSafeSetLong(PreparedStatement ps, int parameterIndex, Long value, int type) Sets theLongvalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues.static voidnullSafeSetString(PreparedStatement ps, int parameterIndex, String value) Sets theStringvalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues.static voidnullSafeSetString(PreparedStatement ps, int parameterIndex, String value, int type) Sets theStringvalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues.static voidnullSafeSetTimestamp(PreparedStatement ps, int parameterIndex, Timestamp value) Sets theTimestampvalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues.static voidnullSafeSetTimestamp(PreparedStatement ps, int parameterIndex, Timestamp value, int type) Sets theTimestampvalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues.static @Nullable StringstringOrNullIfBlank(ResultSet rs, String columnName) Returns a String from the specified column in theResultSet.static @Nullable StringstringOrNullIfBlank(ResultSet rs, String columnName, KiwiJdbc.StringTrimOption option) Returns a String from the specified column in theResultSetusing the givenKiwiJdbc.StringTrimOption.static @Nullable TimestamptimestampFromInstant(Instant instant) static @Nullable TimestamptimestampFromZonedDateTime(ZonedDateTime zonedDateTime) Returns aTimestampfrom the givenZonedDateTime.static @Nullable StringtrimmedStringOrNullIfBlank(ResultSet rs, String columnName) Returns a String from the specified column in theResultSet, trimming leading and trailing whitespace.static ZonedDateTimeutcZonedDateTimeFromEpochMilli(long epochMilli) Returns aZonedDateTimein UTC from the given number of milliseconds since the epoch.static @Nullable ZonedDateTimeutcZonedDateTimeFromTimestamp(ResultSet rs, String columnName) Returns aZonedDateTimein UTC from the specified column in theResultSet.static @Nullable ZonedDateTimeutcZonedDateTimeFromTimestamp(Timestamp timestamp) Returns aZonedDateTimein UTC from the specifiedTimestamp.static @Nullable ZonedDateTimezonedDateTimeFromTimestamp(ResultSet rs, String columnName, ZoneId zoneId) Returns aZonedDateTimein the specified time zone from the specified column in theResultSet.static @Nullable ZonedDateTimezonedDateTimeFromTimestamp(Timestamp timestamp, ZoneId zoneId) Returns aZonedDateTimein the specified time zone from the givenTimestamp.
-
Method Details
-
nextOrThrow
Attempt to callResultSet.next()on the given ResultSet, and throw anIllegalStateExceptionif the result set was not advanced.- Parameters:
rs- the ResultSet- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set (copied fromResultSet.next())IllegalStateException- if the result set was not advanced
-
nextOrThrow
Attempt to callResultSet.next()on the given ResultSet, and throw anIllegalStateExceptionif the result set was not advanced.- Parameters:
rs- the ResultSetmessage- the error message in case the result set cannot be advanced- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set (copied fromResultSet.next())IllegalStateException- if the result set was not advanced
-
nextOrThrow
public static void nextOrThrow(ResultSet rs, String messageTemplate, Object... args) throws SQLException Attempt to callResultSet.next()on the given ResultSet, and throw anIllegalStateExceptionif the result set was not advanced.- Parameters:
rs- the ResultSetmessageTemplate- the error message template in case the result set cannot be advanced, according to howKiwiStrings.format(String, Object...)handles placeholdersargs- the arguments to be substituted into the message template- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set (copied fromResultSet.next())IllegalStateException- if the result set was not advanced
-
epochMillisFromTimestamp
Convert the timestamp column given bycolumnNamein theResultSetto milliseconds from the epoch.- Parameters:
rs- the ResultSetcolumnName- the timestamp column name- Returns:
- epoch milliseconds
- Throws:
SQLException- if there is a database problemIllegalArgumentException- if the timestamp returned from the ResultSet is null- See Also:
-
epochMillisFromTimestamp
Convert the givenTimestampto milliseconds from the epoch.- Parameters:
timestamp- the timestamp to convert- Returns:
- epoch milliseconds
- Throws:
IllegalArgumentException- if timestamp is null- See Also:
-
dateFromTimestamp
- Parameters:
rs- the ResultSetcolumnName- the timestamp column name- Returns:
- the converted Date or
nullif the column wasNULL - Throws:
SQLException- if there is a database problem
-
dateFromTimestamp
- Parameters:
timestamp- the timestamp to convert- Returns:
- a
Dateor null if the timestamp is null
-
instantFromTimestamp
public static @Nullable Instant instantFromTimestamp(ResultSet rs, String columnName) throws SQLException - Parameters:
rs- the ResultSetcolumnName- the timestamp column name- Returns:
- the converted Instant or
nullif the column wasNULL - Throws:
SQLException- if there is a database problem
-
instantFromTimestamp
- Parameters:
timestamp- the timestamp to convert- Returns:
- an Instant or
nullif the timestamp isnull
-
localDateTimeFromTimestamp
public static @Nullable LocalDateTime localDateTimeFromTimestamp(ResultSet rs, String columnName) throws SQLException - Parameters:
rs- the ResultSetcolumnName- the timestamp column name- Returns:
- the converted LocalDateTime or
nullif the column wasNULL - Throws:
SQLException- if there is a database problem
-
localDateTimeFromTimestamp
Returns aLocalDateTimefrom the givenTimestamp.- Parameters:
timestamp- the timestamp to convert- Returns:
- a LocalDateTime or
nullif the timestamp isnull
-
localDateFromDateOrNull
public static @Nullable LocalDate localDateFromDateOrNull(ResultSet rs, String columnName) throws SQLException - Parameters:
rs- the ResultSetcolumnName- the date column name- Returns:
- the converted LocalDate or
nullif the column wasNULL - Throws:
SQLException- if there is any error getting the date value from the database
-
localDateFromDateOrNull
Returns aLocalDateTimefrom the givenDate.- Parameters:
date- the date to convert- Returns:
- the converted LocalDate or
nullif the date isnull
-
utcZonedDateTimeFromTimestamp
public static @Nullable ZonedDateTime utcZonedDateTimeFromTimestamp(ResultSet rs, String columnName) throws SQLException Returns aZonedDateTimein UTC from the specified column in theResultSet.- Parameters:
rs- the ResultSetcolumnName- the timestamp column name- Returns:
- a UTC ZonedDateTime or
nullif the column wasNULL - Throws:
SQLException- if there is a database problem
-
zonedDateTimeFromTimestamp
public static @Nullable ZonedDateTime zonedDateTimeFromTimestamp(ResultSet rs, String columnName, ZoneId zoneId) throws SQLException Returns aZonedDateTimein the specified time zone from the specified column in theResultSet.- Parameters:
rs- the ResultSetcolumnName- the timestamp column namezoneId- the time zone ID- Returns:
- a ZonedDateTime in the specified zone, or
nullif the column wasNULL - Throws:
SQLException- if there is a database problem
-
utcZonedDateTimeFromTimestamp
Returns aZonedDateTimein UTC from the specifiedTimestamp.- Parameters:
timestamp- the timestamp to convert- Returns:
- a UTC ZonedDateTime or
nullif the timestamp isnull
-
utcZonedDateTimeFromEpochMilli
Returns aZonedDateTimein UTC from the given number of milliseconds since the epoch.Note that this method will always have zero as the nano-of-second.
- Parameters:
epochMilli- number of milliseconds since the epoch- Returns:
- a UTC ZonedDateTime
-
zonedDateTimeFromTimestamp
public static @Nullable ZonedDateTime zonedDateTimeFromTimestamp(Timestamp timestamp, ZoneId zoneId) Returns aZonedDateTimein the specified time zone from the givenTimestamp.- Parameters:
timestamp- the timestamp to convertzoneId- the time zone ID- Returns:
- a ZonedDateTime in the specified zone, or
nullif the timestamp isnull
-
timestampFromInstant
- Parameters:
instant- the Instant to convert- Returns:
- a Timestamp or
nullif the instant isnull
-
timestampFromZonedDateTime
Returns aTimestampfrom the givenZonedDateTime.- Parameters:
zonedDateTime- the ZonedDateTime to convert- Returns:
- a Timestamp or
nullif the zonedDateTime isnull
-
longValueOrNull
Simplifies the JDBC silliness whereby getting a long value that is actuallynullreturns zero, and you have to check if the last value was actuallynullusing theResultSet.wasNull()method.- Parameters:
rs- the ResultSetcolumnName- the column name- Returns:
- a
Longornull - Throws:
SQLException- if there is a database problem
-
intValueOrNull
Simplifies the JDBC silliness whereby getting an int value that is actuallynullreturns zero, and you have to check if the last value was actuallynullusing theResultSet.wasNull()method.- Parameters:
rs- the ResultSetcolumnName- the column name- Returns:
- an
Integerornull - Throws:
SQLException- if there is a database problem
-
doubleValueOrNull
public static @Nullable Double doubleValueOrNull(ResultSet rs, String columnName) throws SQLException Simplifies the JDBC silliness whereby getting a double value that is actuallynullreturns zero, and you have to check if the last value was actuallynullusing theResultSet.wasNull()method.- Parameters:
rs- the ResultSetcolumnName- the column name- Returns:
- a
Doubleornull - Throws:
SQLException- if there is a database problem
-
enumValueOrNull
public static <T extends Enum<T>> @Nullable T enumValueOrNull(ResultSet rs, String columnName, Class<T> enumType) throws SQLException Returns an enum constant of the given type from the specified column in the result set.- Type Parameters:
T- the enum type parameter- Parameters:
rs- the ResultSetcolumnName- the column nameenumType- the enum class- Returns:
- an enum constant of type
enumTypeornullif the database value was NULL - Throws:
SQLException- if there is a database problemIllegalArgumentException- if the value from the ResultSet is an invalid enum constant- See Also:
-
enumValueOrEmpty
public static <T extends Enum<T>> Optional<T> enumValueOrEmpty(ResultSet rs, String columnName, Class<T> enumType) throws SQLException Returns an enum constant of the given type from the specified column in the result set.- Type Parameters:
T- the enum type parameter- Parameters:
rs- the ResultSetcolumnName- the column nameenumType- the enum class- Returns:
- an enum constant of type
enumTypeor an emptyOptionalif the database value was NULL - Throws:
SQLException- if there is a database problemIllegalArgumentException- if the value from the ResultSet is an invalid enum constant- See Also:
-
booleanFromLong
Converts a long value in the specified column to a boolean. The database value must be zero, one or NULL.- Parameters:
rs- the ResultSetcolumnName- the column name- Returns:
- true if the database value is one, or false if it is zero or NULL
- Throws:
IllegalArgumentException- if the value in the column is not zero, one, or NULLSQLException- if there is any error getting the value from the database- See Also:
-
booleanFromLong
public static boolean booleanFromLong(ResultSet rs, String columnName, KiwiPrimitives.BooleanConversionOption option) throws SQLException Converts a long value in the specified column to a boolean using the givenKiwiPrimitives.BooleanConversionOption.- Parameters:
rs- the ResultSetcolumnName- the column nameoption- how to convert the long value into a boolean- Returns:
- the converted value, determined using the conversion option
- Throws:
SQLException- if there is any error getting the value from the database
-
booleanFromInt
Converts an int value in the specified column to a boolean. The database value must be zero, one or NULL.- Parameters:
rs- the ResultSetcolumnName- the column name- Returns:
- true if the database value is one, or false if it is zero or NULL
- Throws:
IllegalArgumentException- if the value in the column is not zero, one, or NULLSQLException- if there is any error getting the value from the database- See Also:
-
booleanFromInt
public static boolean booleanFromInt(ResultSet rs, String columnName, KiwiPrimitives.BooleanConversionOption option) throws SQLException Converts an int value in the specified column to a boolean using the givenKiwiPrimitives.BooleanConversionOption.- Parameters:
rs- the ResultSetcolumnName- the column nameoption- how to convert the int value into a boolean- Returns:
- the converted value, determined using the conversion option
- Throws:
SQLException- if there is any error getting the value from the database
-
stringOrNullIfBlank
public static @Nullable String stringOrNullIfBlank(ResultSet rs, String columnName) throws SQLException Returns a String from the specified column in theResultSet. When the database value isNULLor contains only whitespace, returnsnull.- Parameters:
rs- the ResultSetcolumnName- the date column name- Returns:
- the String value, or
nullif the column was blank orNULL - Throws:
SQLException- if there is any error getting the value from the database- See Also:
-
trimmedStringOrNullIfBlank
public static @Nullable String trimmedStringOrNullIfBlank(ResultSet rs, String columnName) throws SQLException Returns a String from the specified column in theResultSet, trimming leading and trailing whitespace. When the database value isNULLor contains only whitespace, returnsnull.- Parameters:
rs- the ResultSetcolumnName- the date column name- Returns:
- the String with leading and trailing whitespace removed, or
nullif the column was blank orNULL - Throws:
SQLException- if there is any error getting the value from the database- See Also:
-
stringOrNullIfBlank
public static @Nullable String stringOrNullIfBlank(ResultSet rs, String columnName, KiwiJdbc.StringTrimOption option) throws SQLException Returns a String from the specified column in theResultSetusing the givenKiwiJdbc.StringTrimOption. When the database value isNULLor contains only whitespace, returnsnull.- Parameters:
rs- the ResultSetcolumnName- the date column nameoption- how to handle leading and trailing whitespace- Returns:
- the String with the specified trim option applied, or
nullif the column was blank orNULL - Throws:
SQLException- if there is any error getting the value from the database- See Also:
-
nullSafeSetTimestamp
public static void nullSafeSetTimestamp(PreparedStatement ps, int parameterIndex, Timestamp value) throws SQLException Sets theTimestampvalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues. UsesTypes.TIMESTAMPas the SQL type.- Parameters:
ps- the PreparedStatement to set the value onparameterIndex- the positional index of the value in the SQL statementvalue- the value to set, ornull- Throws:
SQLException- if there is a database problem
-
nullSafeSetTimestamp
public static void nullSafeSetTimestamp(PreparedStatement ps, int parameterIndex, Timestamp value, int type) throws SQLException Sets theTimestampvalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues. Specify the exact SQL timestamp type using one of the values inTypes.- Parameters:
ps- the PreparedStatement to set the value onparameterIndex- the positional index of the value in the SQL statementvalue- the value to set, ornulltype- the SQL type to use when setting anullvalue- Throws:
SQLException- if there is a database problem- See Also:
-
nullSafeSetDateAsTimestamp
public static void nullSafeSetDateAsTimestamp(PreparedStatement ps, int parameterIndex, Date value) throws SQLException Sets theDatevalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues. UsesTypes.TIMESTAMPas the SQL type.- Parameters:
ps- the PreparedStatement to set the value onparameterIndex- the positional index of the value in the SQL statementvalue- the value to set, ornull- Throws:
SQLException- if there is a database problem
-
nullSafeSetDateAsTimestamp
public static void nullSafeSetDateAsTimestamp(PreparedStatement ps, int parameterIndex, Date value, int type) throws SQLException Sets theDatevalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues. Specify the exact SQL timestamp type using one of the values inTypes.- Parameters:
ps- the PreparedStatement to set the value onparameterIndex- the positional index of the value in the SQL statementvalue- the value to set, ornulltype- the SQL type to use when setting anullvalue- Throws:
SQLException- if there is a database problem- See Also:
-
nullSafeSetInt
public static void nullSafeSetInt(PreparedStatement ps, int parameterIndex, Integer value) throws SQLException Sets theIntegervalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues. UsesTypes.INTEGERas the SQL type.- Parameters:
ps- the PreparedStatement to set the value onparameterIndex- the positional index of the value in the SQL statementvalue- the value to set, ornull- Throws:
SQLException- if there is a database problem
-
nullSafeSetInt
public static void nullSafeSetInt(PreparedStatement ps, int parameterIndex, Integer value, int type) throws SQLException Sets theIntegervalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues. Specify the exact SQL int type using one of the values inTypes.- Parameters:
ps- the PreparedStatement to set the value onparameterIndex- the positional index of the value in the SQL statementvalue- the value to set, ornulltype- the SQL type to use when setting anullvalue- Throws:
SQLException- if there is a database problem- See Also:
-
nullSafeSetLong
public static void nullSafeSetLong(PreparedStatement ps, int parameterIndex, Long value) throws SQLException Sets theLongvalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues. UsesTypes.BIGINTas the SQL type.- Parameters:
ps- the PreparedStatement to set the value onparameterIndex- the positional index of the value in the SQL statementvalue- the value to set, ornull- Throws:
SQLException- if there is a database problem
-
nullSafeSetLong
public static void nullSafeSetLong(PreparedStatement ps, int parameterIndex, Long value, int type) throws SQLException Sets theLongvalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues. Specify the exact SQL long type using one of the values inTypes.- Parameters:
ps- the PreparedStatement to set the value onparameterIndex- the positional index of the value in the SQL statementvalue- the value to set, ornulltype- the SQL type to use when setting anullvalue- Throws:
SQLException- if there is a database problem- See Also:
-
nullSafeSetDouble
public static void nullSafeSetDouble(PreparedStatement ps, int parameterIndex, Double value) throws SQLException Sets theDoublevalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues. UsesTypes.DOUBLEas the SQL type.- Parameters:
ps- the PreparedStatement to set the value onparameterIndex- the positional index of the value in the SQL statementvalue- the value to set, ornull- Throws:
SQLException- if there is a database problem
-
nullSafeSetDouble
public static void nullSafeSetDouble(PreparedStatement ps, int parameterIndex, Double value, int type) throws SQLException Sets theDoublevalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues. Specify the exact SQL double type using one of the values inTypes.- Parameters:
ps- the PreparedStatement to set the value onparameterIndex- the positional index of the value in the SQL statementvalue- the value to set, ornulltype- the SQL type to use when setting anullvalue- Throws:
SQLException- if there is a database problem- See Also:
-
nullSafeSetString
public static void nullSafeSetString(PreparedStatement ps, int parameterIndex, String value) throws SQLException Sets theStringvalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues. UsesTypes.VARCHARas the SQL type.- Parameters:
ps- the PreparedStatement to set the value onparameterIndex- the positional index of the value in the SQL statementvalue- the value to set, ornull- Throws:
SQLException- if there is a database problem
-
nullSafeSetString
public static void nullSafeSetString(PreparedStatement ps, int parameterIndex, String value, int type) throws SQLException Sets theStringvalue in a null-safe manner by using thePreparedStatement.setNull(int, int)method fornullvalues. Specify the exact SQL string type using one of the values inTypes.- Parameters:
ps- the PreparedStatement to set the value onparameterIndex- the positional index of the value in the SQL statementvalue- the value to set, ornulltype- the SQL type as an int, seeSQLType- Throws:
SQLException- if there is a database problem- See Also:
-