You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey Mashenkov (Jira)" <ji...@apache.org> on 2024/06/07 12:44:00 UTC
[jira] [Updated] (IGNITE-16116) Support user mapping functions
[ https://issues.apache.org/jira/browse/IGNITE-16116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrey Mashenkov updated IGNITE-16116:
--------------------------------------
Description:
Let's allow users to implement their own strategy of marshaling objects.
The {{Tuple}} interface looks good candidate for representing a row, rather than exposing any internals to the user.
Suggested method signature for {{org.apache.ignite.table.mapper.Mapper}} class
{code:java}
/**
* Adds a manual functional mapping for an object and a row represented by a tuple.
*
* @param objectToRow Object to tuple function.
* @param rowToObject Tuple to object function.
* @return {@code this} for chaining.
*/
static <O> Mapper<O> of(Function<O, Tuple> objectToRow, Function<Tuple, O> rowToObject);{code}
was:
Let's allow users to implement their own strategy of marshaling objects.
The {{Tuple}} interface looks good candidate for representing a row, rather than exposing any internals to the user.
Start point is {{Mapper.of(Function<O, Tuple> objectToRow, Function<Tuple, O> rowToObject)}}.
> Support user mapping functions
> ------------------------------
>
> Key: IGNITE-16116
> URL: https://issues.apache.org/jira/browse/IGNITE-16116
> Project: Ignite
> Issue Type: Improvement
> Reporter: Andrey Mashenkov
> Priority: Major
> Labels: ignite-3
>
> Let's allow users to implement their own strategy of marshaling objects.
> The {{Tuple}} interface looks good candidate for representing a row, rather than exposing any internals to the user.
> Suggested method signature for {{org.apache.ignite.table.mapper.Mapper}} class
> {code:java}
> /**
> * Adds a manual functional mapping for an object and a row represented by a tuple.
> *
> * @param objectToRow Object to tuple function.
> * @param rowToObject Tuple to object function.
> * @return {@code this} for chaining.
> */
> static <O> Mapper<O> of(Function<O, Tuple> objectToRow, Function<Tuple, O> rowToObject);{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)