Revert query execution changes (#1341)

* Revert "handle sql variable type (#1333)"

This reverts commit 51c801eb33.

* Revert "handle large decimal (#1326)"

This reverts commit fd5b8af0c0.
This commit is contained in:
Karl Burtram
2021-12-15 11:15:11 -08:00
committed by GitHub
parent adb82f2dd0
commit cb290cdbb5
8 changed files with 35 additions and 59 deletions

View File

@@ -76,7 +76,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage
{typeof(bool), (o, id, col) => ReadBoolean(o, id)},
{typeof(double), (o, id, col) => ReadDouble(o, id)},
{typeof(float), (o, id, col) => ReadSingle(o, id)},
{typeof(decimal), (o, id, col) => ReadSqlDecimal(o, id)},
{typeof(decimal), (o, id, col) => ReadDecimal(o, id)},
{typeof(DateTime), ReadDateTime},
{typeof(DateTimeOffset), (o, id, col) => ReadDateTimeOffset(o, id)},
{typeof(TimeSpan), (o, id, col) => ReadTimeSpan(o, id)},
@@ -134,15 +134,14 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage
continue;
}
// We need to specify the assembly name for SQL types in order to resolve the type correctly.
if (sqlVariantType.StartsWith("System.Data.SqlTypes."))
{
sqlVariantType = sqlVariantType + ", System.Data.Common";
}
// The typename is stored in the string
colType = Type.GetType(sqlVariantType);
if (colType == null)
// Workaround .NET bug, see sqlbu# 440643 and vswhidbey# 599834
// TODO: Is this workaround necessary for .NET Core?
if (colType == null && sqlVariantType == "System.Data.SqlTypes.SqlSingle")
{
throw new ArgumentException(SR.QueryServiceUnsupportedSqlVariantType(sqlVariantType, column.ColumnName));
colType = typeof(SqlSingle);
}
}
else