public interface ResultMapperFactoryFactory
Modifier and Type | Interface and Description |
---|---|
static interface |
ResultMapperFactoryFactory.Builder |
Modifier and Type | Method and Description |
---|---|
ArrayValueToTarantoolTupleResultMapperFactory |
arrayTupleResultMapperFactory()
Default factory for call result with a list of tuples.
|
ResultMapperFactoryFactory.Builder |
createMapper(MessagePackMapper messagePackMapper)
Return builder to create mapper which may depend on input clientMapper
For example, you can create maper that can obtain crud and box results from lua
and read it into
TarantoolTupleResult structure. |
ResultMapperFactoryFactory.Builder |
createMapper(MessagePackMapper messagePackMapper,
TarantoolSpaceMetadata spaceMetadata)
Return builder to create mapper which may depend on input clientMapper
For example, you can create maper that can obtain crud and box results from lua
and read it into
TarantoolTupleResult structure. |
TarantoolTupleResultMapperFactory |
getTarantoolTupleResultMapperFactory()
Default factory for call result with different structures.
|
<T,R extends List<T>> |
multiValueResultMapperFactory()
Create a factory for mapping stored Lua function multi-return call result to
MultiValueCallResult with
the custom result and tuple types. |
<T> MultiValueWithTarantoolResultMapperFactory<T> |
multiValueTarantoolResultMapperFactory()
Default factory for the mapping stored Lua function call multi-return result to
TarantoolResult , where
each value is interpreted as a tuple of custom type. |
MultiValueWithTarantoolTupleResultMapperFactory |
multiValueTupleResultMapperFactory()
Default factory for the stored Lua function call result, interpreted in a way that each returned item is a tuple.
|
<T> ArrayValueToTarantoolResultMapperFactory<T> |
rowsMetadataStructureResultMapperFactory()
Create a factory for mapping stored function call result to
MultiValueCallResult containing a list
of tuples mapped to TarantoolResult
input: storing structure(e.g. |
RowsMetadataToTarantoolTupleResultMapperFactory |
rowsMetadataTupleResultMapperFactory()
Default factory for call result with a list of tuples in structure with metadata.
|
<T> SingleValueResultMapperFactory<T> |
singleValueResultMapperFactory()
Create a factory for mapping stored Lua function call results to
SingleValueCallResult
input: [x, y, ...], MessagePack array from a Lua function multi-return response
where x, y are some MessagePack values. |
<T> SingleValueWithTarantoolResultMapperFactory<T> |
singleValueTarantoolResultMapperFactory()
Create a factory for mapping stored function call result to
SingleValueCallResult containing a list
of tuples mapped to TarantoolResult
input: [x, y, z], MessagePack array from a Lua function multi return response
where x is a data structure with an array of tuples inside ([t1, t2, ...]) and y
can be interpreted as an error structure if it is not empty and there are no more arguments after y . |
SingleValueWithTarantoolTupleResultMapperFactory |
singleValueTupleResultMapperFactory()
Default factory for single the stored Lua function call result in the form
return result, err
with a list of tuples as a result. |
ArrayValueToTarantoolTupleResultMapperFactory arrayTupleResultMapperFactory()
TarantoolTuple
inside.
The IProto method results by default contain lists of tuples.
This factory can be used at the inner level by other mapper factories that are handling higher-level containers.
input: array of tuples with MessagePack values inside ([t1, t2, ...])
mapper result: TarantoolResult<TarantoolTuple>
Mapper result and its inner depends on the parameters or converters you passed.
TarantoolTupleResultMapperFactory getTarantoolTupleResultMapperFactory()
TarantoolTuple
inside.
The IProto method results by default contain lists of tuples.
The crud results by default contain map with list of tuple inside.
This factory can be used at the inner level by other mapper factories that are handling higher-level containers.
input: structure with array of tuples with MessagePack values inside ([t1, t2, ...])
mapper result: TarantoolResult<TarantoolTuple>
RowsMetadataToTarantoolTupleResultMapperFactory rowsMetadataTupleResultMapperFactory()
TarantoolTuple
inside.
The IProto method results by default contain lists of tuples.
This factory can be used at the inner level by other mapper factories that are handling higher-level containers.
input: map with metadata and array of tuples with MessagePack values inside ([t1, t2, ...])
mapper result: TarantoolResult<TarantoolTuple>
Mapper result and its inner depends on the parameters or converters you passed.
SingleValueWithTarantoolTupleResultMapperFactory singleValueTupleResultMapperFactory()
return result, err
with a list of tuples as a result.
For example, this form of the result is used for some tarantool/crud library responses.
input: [x, y, ...], MessagePack array from a Lua function multi-return response
where x
is a data structure with an array of tuples inside ([t1, t2, ...]) and y
can be interpreted as an error structure if it is not empty and there are no more arguments after
y
`
mapper result: converted value of x
to TarantoolResult<TarantoolTuple>
Mapper result and the inner contents depend on the parameters or the passed converters.
<T> SingleValueWithTarantoolResultMapperFactory<T> singleValueTarantoolResultMapperFactory()
SingleValueCallResult
containing a list
of tuples mapped to TarantoolResult
input: [x, y, z], MessagePack array from a Lua function multi return response
where x
is a data structure with an array of tuples inside ([t1, t2, ...]) and y
can be interpreted as an error structure if it is not empty and there are no more arguments after y
.
A tuple can be represented by any custom object or value.
mapper result: converted value of x
to TarantoolResult<TarantoolTuple>
Mapper result and its inner contents depend on the parameters or the passed converters.
T
- target inner content type<T> SingleValueResultMapperFactory<T> singleValueResultMapperFactory()
SingleValueCallResult
input: [x, y, ...], MessagePack array from a Lua function multi-return response
where x, y
are some MessagePack values. x
is interpreted as a stored Lua function
result and y
may be interpreted as a stored Lua function error if it is not empty and there are
no more arguments after y
.
mapper result: some Java type converted from the value of x
according to the mapper, passed as a
parameter to this one for parsing the result contents.
Mapper result and its inner contents depend on the parameters or the passed converters.
T
- target result typeMultiValueWithTarantoolTupleResultMapperFactory multiValueTupleResultMapperFactory()
input: [x, y, z, ...], MessagePack array from a Lua function multi-return response
where x, y, z
are some MessagePack values, each one representing a Tarantool tuple
mapper result: TarantoolResult<TarantoolTuple>
converted from [x, y, z, ...]
Mapper result and its inner contents depend on the parameters or the passed converters.
<T> MultiValueWithTarantoolResultMapperFactory<T> multiValueTarantoolResultMapperFactory()
TarantoolResult
, where
each value is interpreted as a tuple of custom type.
input: [x, y, z, ...], MessagePack array from a Lua function multi-return response
where x, y, z
are some MessagePack values, each one representing a custom value
mapper result: TarantoolResult<T>
converted from [x, y, z, ...]
Mapper result and its inner contents depend on the parameters or the passed converters.
Mapper checks errors and that result is not empty and uses
ArrayValueToTarantoolResultMapperFactory
for further parsing
T
- target inner content type<T,R extends List<T>> MultiValueResultMapperFactory<T,R> multiValueResultMapperFactory()
MultiValueCallResult
with
the custom result and tuple types.
input: [x, y, z, ...], MessagePack array from a Lua function multi-return response that is converted to the
target result type
where x, y, z
are some MessagePack values, each one representing a custom value
mapper result: a custom Java type inheriting List<T>
that is converted from [x, y, z, ...]
Mapper result and its inner contents depend on the parameters or the passed converters.
T
- target result typeR
- target result inner contents item type<T> ArrayValueToTarantoolResultMapperFactory<T> rowsMetadataStructureResultMapperFactory()
MultiValueCallResult
containing a list
of tuples mapped to TarantoolResult
input: storing structure(e.g. [x, y, z] messagepack array)
where x, y, z are some MessagePack Values
mapper result: converted TarantoolResult<T>
from [x, y, z]
Mapper result and its inner contents depend on the parameters or the passed converters. For example, you can parse any MessagePack array to TarantoolResult even if it's an empty array.
T
- target inner result typeResultMapperFactoryFactory.Builder createMapper(MessagePackMapper messagePackMapper)
TarantoolTupleResult
structure.
CallResultMapper callReturnMapper = factory.createMapper(valueMapper)
.withSingleValueConverter( // obtain first value from lua multi-value response
factory.createMapper(valueMapper)
.withArrayValueToTarantoolTupleResultConverter() // box type response
.withRowsMetadataToTarantoolTupleResultMapper() // crud type response
.buildCallResultMapper()
)
.buildCallResultMapper();
This mapper wouldn't have metadata to take fields by their names.messagePackMapper
- input client mapperResultMapperFactoryFactory.Builder createMapper(MessagePackMapper messagePackMapper, TarantoolSpaceMetadata spaceMetadata)
TarantoolTupleResult
structure.
CallResultMapper callReturnMapper = factory.createMapper(valueMapper)
.withSingleValueConverter( // obtain first value from lua multi-value response
factory.createMapper(valueMapper)
.withArrayValueToTarantoolTupleResultConverter() // box type response
.withRowsMetadataToTarantoolTupleResultMapper() // crud type response
.buildCallResultMapper()
)
.buildCallResultMapper();
messagePackMapper
- input client mapperspaceMetadata
- metadata to get fields by namesCopyright © 2025 Picodata. All rights reserved.