Package io.deephaven.jdbc
Class JdbcTypeMapper.FloatToDecimalDataTypeMapping
java.lang.Object
io.deephaven.jdbc.JdbcTypeMapper.DataTypeMapping<BigDecimal>
io.deephaven.jdbc.JdbcTypeMapper.FloatToDecimalDataTypeMapping
- Enclosing class:
- JdbcTypeMapper
public static class JdbcTypeMapper.FloatToDecimalDataTypeMapping
extends JdbcTypeMapper.DataTypeMapping<BigDecimal>
A mapping that converts SQL single precision floating point to Deephaven BigDecimal
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bindFromChunk
(Chunk<Values> srcChunk, int srcOffset, PreparedStatement stmt, int parameterIndex, JdbcTypeMapper.Context context) Bind the given value from the chunk in the given prepared statement.void
bindToChunk
(WritableChunk<Values> destChunk, int destOffset, ResultSet resultSet, int columnIndex, JdbcTypeMapper.Context context) Get a value from the current row in the given ResultSet, convert to the target type, insert into destination chunk.Methods inherited from class io.deephaven.jdbc.JdbcTypeMapper.DataTypeMapping
getDeephavenType, getInputType
-
Method Details
-
bindToChunk
public void bindToChunk(WritableChunk<Values> destChunk, int destOffset, ResultSet resultSet, int columnIndex, JdbcTypeMapper.Context context) throws SQLException Description copied from class:JdbcTypeMapper.DataTypeMapping
Get a value from the current row in the given ResultSet, convert to the target type, insert into destination chunk. A Context object is provided for additional context or "settings" regarding how to perform the conversion (for example, the source time zone).- Specified by:
bindToChunk
in classJdbcTypeMapper.DataTypeMapping<BigDecimal>
- Parameters:
destChunk
- the chunk to write todestOffset
- the location in the chunk to write toresultSet
- from which to extract the valuecolumnIndex
- ResultSet column from which to extract the value (1-based)context
- conversion context information- Throws:
SQLException
- if an error occurs
-
bindFromChunk
public void bindFromChunk(Chunk<Values> srcChunk, int srcOffset, PreparedStatement stmt, int parameterIndex, JdbcTypeMapper.Context context) throws SQLException Description copied from class:JdbcTypeMapper.DataTypeMapping
Bind the given value from the chunk in the given prepared statement.- Specified by:
bindFromChunk
in classJdbcTypeMapper.DataTypeMapping<BigDecimal>
- Parameters:
srcChunk
- the chunk to read fromsrcOffset
- the location in the chunk to read fromstmt
- statement to which to bind the given valueparameterIndex
- parameter index to bindcontext
- context information for the binding- Throws:
SQLException
- if an error occurs
-