Package io.micronaut.data.runtime.mapper
Interface JsonColumnReader<S>
- Type Parameters:
S
- the result set type
- All Known Subinterfaces:
SqlJsonColumnReader<S>
public interface JsonColumnReader<S>
The wrapper around
JsonMapper
to read JSON values from the result set.- Since:
- 4.0.0
- Author:
- radovanradic
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull io.micronaut.json.JsonMapper
default <T> T
readJsonColumn
(ResultReader<S, String> resultReader, S resultSet, String columnName, JsonDataType jsonDataType, io.micronaut.core.type.Argument<T> argument) Reads JSON column from the result set and returns as expected type.
-
Field Details
-
NULL_VALUE
JSON string null value.- See Also:
-
-
Method Details
-
readJsonColumn
default <T> T readJsonColumn(ResultReader<S, String> resultReader, S resultSet, String columnName, JsonDataType jsonDataType, io.micronaut.core.type.Argument<T> argument) Reads JSON column from the result set and returns as expected type.- Type Parameters:
T
- the result type- Parameters:
resultReader
- the result readerresultSet
- the result setcolumnName
- the column namejsonDataType
- the JSON typeargument
- the result type argument- Returns:
- object of type T read from JSON column
-
getJsonMapper
@NonNull @NonNull io.micronaut.json.JsonMapper getJsonMapper()- Returns:
- the json mapper
-