public interface InsertInto extends OngoingValues
Modifier and Type | Method and Description |
---|---|
JsonInsert |
json(BindMarker bindMarker)
Makes this statement an INSERT JSON with a bind marker, as in
INSERT JSON ? . |
default JsonInsert |
json(Object value,
CodecRegistry codecRegistry)
Makes this statement an INSERT JSON with a custom type mapping.
|
JsonInsert |
json(String json)
Makes this statement an INSERT JSON with the provided JSON string.
|
<T> JsonInsert |
json(T value,
TypeCodec<T> codec)
Makes this statement an INSERT JSON with a custom type mapping.
|
value, value, values, valuesByIds
@NonNull JsonInsert json(@NonNull String json)
@NonNull JsonInsert json(@NonNull BindMarker bindMarker)
INSERT JSON ?
.@NonNull default JsonInsert json(@NonNull Object value, @NonNull CodecRegistry codecRegistry)
Object
value
will be mapped to a JSON string.
This is an alternative to json(String)
for custom type mappings. The provided
registry should contain a codec that can format the value. Typically, this will be your
session's registry, which is accessible via session.getContext().getCodecRegistry()
.
CodecNotFoundException
- if codecRegistry
does not contain any codec that can
handle value
.AttachmentPoint.getCodecRegistry()
@NonNull <T> JsonInsert json(@NonNull T value, @NonNull TypeCodec<T> codec)
Object
value
will be mapped to a JSON string. The value will be turned into a string with TypeCodec.format(Object)
, and inlined in the query.Copyright © 2017–2021. All rights reserved.