mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-17 02:51:45 -05:00
handle UDT type (#1424)
This commit is contained in:
@@ -182,7 +182,11 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Type type;
|
Type type;
|
||||||
if (!sqlDBTypeMap.TryGetValue(column.SqlDbType, out type))
|
if (column.SqlDbType == SqlDbType.Udt)
|
||||||
|
{
|
||||||
|
type = column.DataType;
|
||||||
|
}
|
||||||
|
else if (!sqlDBTypeMap.TryGetValue(column.SqlDbType, out type))
|
||||||
{
|
{
|
||||||
type = typeof(SqlString);
|
type = typeof(SqlString);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,6 +190,12 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.QueryExecution
|
|||||||
await ExecuteAndVerifyResult("SELECT CAST('<ABC>1234</ABC>' AS XML)", "<ABC>1234</ABC>");
|
await ExecuteAndVerifyResult("SELECT CAST('<ABC>1234</ABC>' AS XML)", "<ABC>1234</ABC>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task GeometryTypeTest()
|
||||||
|
{
|
||||||
|
await ExecuteAndVerifyResult("SELECT geometry::STGeomFromText('POINT (-96.70 40.84)',4326) [Geo]", "0xE6100000010CCDCCCCCCCC2C58C0EC51B81E856B4440");
|
||||||
|
}
|
||||||
|
|
||||||
private async Task ExecuteAndVerifyResult(string queryText, string expectedValue)
|
private async Task ExecuteAndVerifyResult(string queryText, string expectedValue)
|
||||||
{
|
{
|
||||||
// Given a connection to a live database
|
// Given a connection to a live database
|
||||||
|
|||||||
Reference in New Issue
Block a user