Box.Eval Parameters
MGEHub opened this issue · 6 comments
MGEHub commented
How a parameter will be defined in Box.Eval<> expression?
MGEHub commented
Not really, I meant in .net client
MGEHub commented
The real issue is that how an object with a byte array member could be used as parameter in Box.Eval method?
aensidhe commented
MGEHub commented
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?
MGEHub commented
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.