Skip to content

Commit

Permalink
Disable trigger enumeration on Azure Synapse Analytics, where trigger…
Browse files Browse the repository at this point in the history
…s are not supported (#31036)

See https://learn.microsoft.com/azure/synapse-analytics/sql/overview-features

fixes #30998

Co-authored-by: Erik Ejlskov Jensen <eeje@vf.dk>
  • Loading branch information
ErikEJ and Erik Ejlskov Jensen committed Jul 6, 2023
1 parent 59a90bf commit c8b267d
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,11 @@ private static string EscapeLiteral(string s)
GetColumns(connection, tables, filter, viewFilter, typeAliases, databaseCollation);
GetIndexes(connection, tables, filter);
GetForeignKeys(connection, tables, filter);
GetTriggers(connection, tables, filter);

if (SupportsTriggers())
{
GetTriggers(connection, tables, filter);
}

foreach (var table in tables)
{
Expand Down Expand Up @@ -1343,6 +1347,9 @@ private bool SupportsMemoryOptimizedTable()
private bool SupportsSequences()
=> _compatibilityLevel >= 110 && _engineEdition != 6;

private bool SupportsTriggers()
=> _engineEdition != 6;

private static string DisplayName(string? schema, string name)
=> (!string.IsNullOrEmpty(schema) ? schema + "." : "") + name;

Expand Down

0 comments on commit c8b267d

Please sign in to comment.