progaudi/progaudi.tarantool

Box.Eval Parameters

MGEHub opened this issue · 6 comments

How a parameter will be defined in Box.Eval<> expression?

Will this help?

Not really, I meant in .net client

The real issue is that how an object with a byte array member could be used as parameter in Box.Eval method?

Assuming this:

var result = _box.Eval<InputType, string>(
@"
box.begin()

                            someFunction(1, 'test', {{ input }})
                            someOtherFunction()

                            box.commit()

                            ", input);

How the input parameter can be referenced in the expression?

And in this test:

[Fact]
public async Task evaluate_expression()
{
using (var tarantoolClient = await Client.Box.Connect(ConnectionStringFactory.GetReplicationSource_1_7()))
{
var result = await tarantoolClient.Eval<TarantoolTuple<int, int, int>, int>("return ...", TarantoolTuple.Create(1, 2, 3));

            result.Data.ShouldBe(new[] {1, 2, 3});
        }

}

the result has to be int not TarantoolTuple. at least in my version.