java.lang.Object
io.helidon.dbclient.json.JsonMapper
- All Implemented Interfaces:
DbMapper<JsonObject>
Helidon JSON mapper.
-
Method Summary
Modifier and TypeMethodDescriptionstatic JsonMappercreate()Read database row and convert it to target type instance.toIndexedParameters(JsonObject value) Convert target type instance to a statement indexed parameters list.toNamedParameters(JsonObject value) Convert target type instance to a statement named parameters map.
-
Method Details
-
create
- Returns:
- a new mapper
-
read
Description copied from interface:DbMapperRead database row and convert it to target type instance.- Specified by:
readin interfaceDbMapper<JsonObject>- Parameters:
row- source database row- Returns:
- target type instance containing database row
-
toNamedParameters
Description copied from interface:DbMapperConvert target type instance to a statement named parameters map.- Specified by:
toNamedParametersin interfaceDbMapper<JsonObject>- Parameters:
value- mapping type instance containing values to be set into statement- Returns:
- map of statement named parameters mapped to values to be set
- See Also:
-
toIndexedParameters
Description copied from interface:DbMapperConvert target type instance to a statement indexed parameters list.Using indexed parameters with typed values is probably not going to work nicely, unless the order is specified and the number of parameters is always related the provided value. There are cases where this is useful though - e.g. for types that represent an iterable collection.
- Specified by:
toIndexedParametersin interfaceDbMapper<JsonObject>- Parameters:
value- mapping type instance containing values to be set into statement- Returns:
- map of statement named parameters mapped to values to be set
- See Also:
-