Package io.micronaut.data.r2dbc.mapper
Class RowTupleMapper
java.lang.Object
io.micronaut.data.r2dbc.mapper.RowTupleMapper
- All Implemented Interfaces:
SqlTypeMapper<io.r2dbc.spi.Row,
,jakarta.persistence.Tuple> TypeMapper<io.r2dbc.spi.Row,
jakarta.persistence.Tuple>
@Internal
public final class RowTupleMapper
extends Object
implements SqlTypeMapper<io.r2dbc.spi.Row,jakarta.persistence.Tuple>
A mapper of
Tuple
.- Since:
- 4.10
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorDescriptionRowTupleMapper
(io.micronaut.core.convert.ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.core.convert.ConversionService
boolean
hasNext
(io.r2dbc.spi.Row resultSet) Is another result available.jakarta.persistence.Tuple
Map the given result set to the given object.Read a value for the given name from the given object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.data.runtime.mapper.TypeMapper
read
-
Constructor Details
-
RowTupleMapper
public RowTupleMapper(io.micronaut.core.convert.ConversionService conversionService)
-
-
Method Details
-
hasNext
public boolean hasNext(io.r2dbc.spi.Row resultSet) Description copied from interface:SqlTypeMapper
Is another result available.- Specified by:
hasNext
in interfaceSqlTypeMapper<io.r2dbc.spi.Row,
jakarta.persistence.Tuple> - Parameters:
resultSet
- The result set- Returns:
- True if it is
-
map
public jakarta.persistence.Tuple map(io.r2dbc.spi.Row rs, Class<jakarta.persistence.Tuple> type) throws DataAccessException Description copied from interface:TypeMapper
Map the given result set to the given object.- Specified by:
map
in interfaceTypeMapper<io.r2dbc.spi.Row,
jakarta.persistence.Tuple> - Parameters:
rs
- The object to maptype
- The type- Returns:
- The mapped object
- Throws:
DataAccessException
- If the object cannot be mapped.
-
read
Description copied from interface:TypeMapper
Read a value for the given name from the given object.- Specified by:
read
in interfaceTypeMapper<io.r2dbc.spi.Row,
jakarta.persistence.Tuple> - Parameters:
object
- The object to read fromname
- The name- Returns:
- The value
-
getConversionService
public io.micronaut.core.convert.ConversionService getConversionService()- Specified by:
getConversionService
in interfaceTypeMapper<io.r2dbc.spi.Row,
jakarta.persistence.Tuple> - Returns:
- The conversion service to use.
-