-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executing stored procedures with List type input #150
Comments
I have a similar problem with different collection await box.Call("save", (
id: (ulong)item.PriceListItemDataID,
supplier_code: item.SupplierCode,
updated_at: item.UpdatedAt.ToString("yyyy-MM-dd hh:mm:ss.fffff"),
count: item.Quantity,
price: item.SupplierPrice,
product_id: item.ProductID,
price_list_id: item.PriceListID
)); But I got an error with message:
In tarantool function I have so code: function save(price_list)
log.info('Start save')
log.info('price_list: %d', price_list)
log.info('product_id: %s', price_list.product_id)
.....
end I looks in the logs and see so picture:
I try find attributes in projects, but I didn`t found Also I try send object with need Attributes, but I have exception
Model [MsgPackArray]
[MsgPackMap]
public class SendData
{
[MsgPackMapElement("id")]
[MsgPackArrayElement(0)]
public ulong ID { get; set; }
[MsgPackMapElement("supplier_code")]
[MsgPackArrayElement(1)]
public string SupplierCode { get; set; }
[MsgPackMapElement("updated_at")]
[MsgPackArrayElement(2)]
public string UpdatedAt { get; set; }
[MsgPackMapElement("count")]
[MsgPackArrayElement(3)]
public string Count { get; set; }
[MsgPackArrayElement(4)]
[MsgPackMapElement("price")]
public string Price { get; set; }
[MsgPackMapElement("product_id")]
[MsgPackArrayElement(5)]
public int ProductID { get; set; }
[MsgPackMapElement("price_list_id")]
[MsgPackArrayElement(6)]
public int PriceListID { get; set; }
} Sending code foreach (var item in data)
{
var a = new SendData()
{
ID = (ulong)item.PriceListItemDataID,
SupplierCode = item.SupplierCode,
UpdatedAt = item.UpdatedAt.ToString("yyyy-MM-dd hh:mm:ss.fffff"),
Count = item.Quantity,
Price = item.SupplierPrice,
ProductID = item.ProductID,
PriceListID = item.PriceListID
};
await box.Call("save", a);
} I see example from tests And I have class
And I write my own implementation for converter I use |
Hi,
I am trying to call a function on tarantool which inserts given list into a space. Function looks like below, it gets list, loop over records and inserts into tester space.
When I call the function within tarantool like the following, it works as expected and inserts records into the space.
tarantool> lst = {{1,'Test',1}, {2, 'Test2', 2}}
tarantool> batch_insert_tester(lst)
When I try to call the function through the library, it fails with the following error.
This is the code I have been using, as an input I am sending list of value tuples (tester space has 3 fields). How can I call a function with a list input like this?
Here is the function defined on tarantool:
The text was updated successfully, but these errors were encountered: