mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-19 01:25:40 -05:00
Fix numerous Azure property issues (#511)
* Avoid crashing if azure edition is System. * Add new Azure-specific options to the prototype and return through the service calls * Send azure properties over database info request * IsCloud should include Azure SQL DW - Fixed references to this feature flag - Updated edition handling to include ManagedInstance and removed AzureV1 check since it's never used and it's been retired.
This commit is contained in:
committed by
Karl Burtram
parent
49f0221dc8
commit
d222af7824
@@ -96,7 +96,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting
|
||||
{
|
||||
Logger.Write(LogLevel.Error, "Exception at PeekDefinition Database.get() : " + cfe.Message);
|
||||
this.error = true;
|
||||
this.errorMessage = (connectionInfo != null && connectionInfo.IsAzure) ? SR.PeekDefinitionAzureError(cfe.Message) : SR.PeekDefinitionError(cfe.Message);
|
||||
this.errorMessage = (connectionInfo != null && connectionInfo.IsCloud) ? SR.PeekDefinitionAzureError(cfe.Message) : SR.PeekDefinitionError(cfe.Message);
|
||||
return null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -513,7 +513,8 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting
|
||||
internal string GetTargetDatabaseEngineEdition()
|
||||
{
|
||||
DatabaseEngineEdition dbEngineEdition = this.serverConnection.DatabaseEngineEdition;
|
||||
string dbEngineEditionString = targetDatabaseEngineEditionMap[dbEngineEdition];
|
||||
string dbEngineEditionString;
|
||||
targetDatabaseEngineEditionMap.TryGetValue(dbEngineEdition, out dbEngineEditionString);
|
||||
return (dbEngineEditionString != null) ? dbEngineEditionString : "SqlServerEnterpriseEdition";
|
||||
}
|
||||
|
||||
@@ -526,7 +527,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting
|
||||
|
||||
internal string GetTargetDatabaseEngineType()
|
||||
{
|
||||
return connectionInfo.IsAzure ? "SqlAzure" : "SingleInstance";
|
||||
return connectionInfo.IsCloud ? "SqlAzure" : "SingleInstance";
|
||||
}
|
||||
|
||||
internal bool LineContainsObject(string line, string objectName, string createSyntax)
|
||||
|
||||
Reference in New Issue
Block a user