Closed vostruk closed 3 years ago
Thank you for your bug report!
I have just fixed this bug in Mapper, now it should properly map array
, variant
and object
data types.
This will be included in the next release of a NuGet package soon - I just need some more time to do some additional tests.
But you already can use fixed version directly from master
branch.
@vostruk, I've included this fix into latest NuGet release - Snowflake.Client 0.3.1. Can you please try this version and approve, that array mapping now works as should?
@fixer-m, yes array mapping works well now. Thanks a lot for solving that!
Also I found another bug related to it (could open a new issue if needed) - when using complex objects (like List) in sqlParams the error is thrown. For example performing an insert with something like:
await snowflakeClient.ExecuteAsync("INSERT INTO EMPLOYEES (EmploymentsList) VALUES (:EmploymentsList);", new { EmploymentsList = new List<string> {"Programmer"} });
Causes an error in SnowflakeClient.cs like 137 (BuildQueryRequest method)
I understand where this may come from, since filtering on such objects may not be needed. But inserts of complex objects is quite common thing, at least in my case. Would be great if we can solve this problem too.
@vostruk Great! Can you please create a new separate issue for this? This is completely unrelated to original mapping issue, new one is related to Parameter Binding feature. Then I can close this bug.
Done, https://github.com/fixer-m/snowflake-db-net-client/issues/5 let's close this one. Thanks for solving!
Hi, First of all thanks for developing this library, it is much better than default one in my opinion!
I was testing it and tried to query Snowflake ARRAY type into C# List, but received
Is there a way to overcome this using Options or the fix should be added to Mapper?