Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikEJ committed Jun 25, 2024
1 parent 429d882 commit cdbbb0b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.IO;
Expand All @@ -17,7 +18,7 @@ internal sealed class SqlMetaDataFactory : DbMetaDataFactory

private const string ServerVersionNormalized90 = "09.00.0000";
private const string ServerVersionNormalized10 = "10.00.0000";

private readonly HashSet<int> _assemblyPropertyUnsupportedEngines = new() { 6, 9, 11 };

public SqlMetaDataFactory(Stream XMLStream,
string serverVersion,
Expand Down Expand Up @@ -53,7 +54,7 @@ private void addUDTsToDataTypesTable(DataTable dataTypesTable, SqlConnection con
engineEditionCommand.CommandText = "SELECT SERVERPROPERTY('EngineEdition');";
var engineEdition = (int)engineEditionCommand.ExecuteScalar();

if (engineEdition is 6 or 9 or 11)
if (_assemblyPropertyUnsupportedEngines.Contains(engineEdition))
{
// Azure SQL Edge (9) throws an exception when querying sys.assemblies
// Azure Synapse Analytics (6) and Azure Synapse serverless SQL pool (11)
Expand Down

0 comments on commit cdbbb0b

Please sign in to comment.