mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-20 17:24:00 -05:00
[brgrbic] SqlOD changes for cloud Server Type and minor bug fixes (#1092)
* The ServerType of SQL OD in SMO is being changed to cloud. This is a minimal set of changes needed in sqltoolservice in order to keep everything working within ADS. * SMO version update
This commit is contained in:
committed by
GitHub
parent
dbfcf4ad61
commit
3e98a2f17b
@@ -7,6 +7,7 @@ using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
using Microsoft.SqlServer.Management.Common;
|
||||
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
|
||||
using Microsoft.SqlTools.Utility;
|
||||
|
||||
@@ -76,6 +77,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
|
||||
/// </summary>
|
||||
public bool IsSqlDW { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the connection Engine Edition
|
||||
/// </summary>
|
||||
public DatabaseEngineEdition EngineEdition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the major version number of the db we are connected to
|
||||
/// </summary>
|
||||
|
||||
@@ -472,6 +472,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
|
||||
connectionInfo.MajorVersion = serverInfo.ServerMajorVersion;
|
||||
connectionInfo.IsSqlDb = serverInfo.EngineEditionId == (int)DatabaseEngineEdition.SqlDatabase;
|
||||
connectionInfo.IsSqlDW = (serverInfo.EngineEditionId == (int)DatabaseEngineEdition.SqlDataWarehouse);
|
||||
connectionInfo.EngineEdition = (DatabaseEngineEdition) serverInfo.EngineEditionId;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using Microsoft.SqlServer.Management.Common;
|
||||
using Microsoft.SqlTools.ServiceLayer.Admin.Contracts;
|
||||
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
|
||||
|
||||
@@ -25,9 +26,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
|
||||
/// </summary>
|
||||
static class ListDatabaseRequestHandlerFactory
|
||||
{
|
||||
public static IListDatabaseRequestHandler getHandler(bool includeDetails, bool isSqlDB)
|
||||
public static IListDatabaseRequestHandler getHandler(bool includeDetails, bool isSqlDB, ConnectionInfo connectionInfo = null)
|
||||
{
|
||||
if (!includeDetails)
|
||||
if (!includeDetails || connectionInfo?.EngineEdition == DatabaseEngineEdition.SqlOnDemand)
|
||||
{
|
||||
return new DatabaseNamesHandler();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user