Investigate and update the conversion matrix used by smi and make sure that this warning in the code is satisfied
|
private static bool CanAccessGetterDirectly(SmiMetaData metaData, ExtendedClrTypeCode setterTypeCode) |
|
{ |
|
// Make sure no-one adds new ExtendedType, nor SqlDbType without updating this file! |
|
Debug.Assert(ExtendedClrTypeCode.First == 0 && (int)ExtendedClrTypeCode.Last == s_canAccessGetterDirectly.GetLength(0) - 1, "ExtendedClrTypeCodes does not match with __canAccessGetterDirectly"); |
|
Debug.Assert(SqlDbType.BigInt == 0 && (int)SqlDbType.DateTimeOffset == s_canAccessGetterDirectly.GetLength(1) - 1, "SqlDbType does not match with __canAccessGetterDirectly"); |
|
Debug.Assert(ExtendedClrTypeCode.First <= setterTypeCode && ExtendedClrTypeCode.Last >= setterTypeCode); |
|
Debug.Assert(SqlDbType.BigInt <= metaData.SqlDbType && SqlDbType.DateTimeOffset >= metaData.SqlDbType); |
The CI runs on Release builds so the CI will not save you from violating assertions in this project.
You will probably need the sql server team to define the extensions to the conversion operations tables that start at
|
private static readonly bool[,] s_canAccessSetterDirectly = { |
I suspect that json to binary might be the only conversion but someone needs to make that decision.
Originally posted by @Wraith2 in #2722 (comment)
Investigate and update the conversion matrix used by smi and make sure that this warning in the code is satisfied
SqlClient/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/ValueUtilsSmi.cs
Lines 2698 to 2704 in 0c45198
The CI runs on Release builds so the CI will not save you from violating assertions in this project.
You will probably need the sql server team to define the extensions to the conversion operations tables that start at
SqlClient/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/ValueUtilsSmi.cs
Line 2920 in 0c45198
I suspect that json to binary might be the only conversion but someone needs to make that decision.
Originally posted by @Wraith2 in #2722 (comment)