Skip to content

Add call(functionName, args, spaceName) like callForTuple in cartridge-springdata #211

@ArtDu

Description

@ArtDu

If we use only cartridge-java, we need to think about writing a bunch of things to accept Tuple and process it

MessagePackMapper defaultMapper = client.getConfig().getMessagePackMapper();
DefaultResultMapperFactoryFactory factory = new DefaultResultMapperFactoryFactory();
TarantoolSpaceMetadata spaceMetadata = client.metadata().getSpaceByName("test_space").get();
TarantoolResult<TarantoolTuple> result = client.call(
        "function_name",
        args,
        defaultMapper,
        factory.defaultTupleSingleResultMapperFactory()
                .withDefaultTupleValueConverter(defaultMapper, spaceMetadata)
).get();

We can simplify it:

TarantoolResult<TarantoolTuple> result = client.call(
        "function_name",
        args
        spaceName
).get();

Metadata

Metadata

Assignees

No one assigned

    Labels

    chosenThis ticket has already chosen by hackathon team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions