mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
fixed the bug with view triggers in object explorer (#639)
This commit is contained in:
@@ -551,6 +551,16 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
return new SmoCollectionWrapper<Trigger>(retValue).Where(c => PassesFinalFilters(parentTable, c));
|
||||
}
|
||||
}
|
||||
View parentView = context.Parent as View;
|
||||
if (parentView != null)
|
||||
{
|
||||
var retValue = parentView.Triggers;
|
||||
if (retValue != null)
|
||||
{
|
||||
retValue.ClearAndInitialize(filter, extraProperties);
|
||||
return new SmoCollectionWrapper<Trigger>(retValue).Where(c => PassesFinalFilters(parentView, c));
|
||||
}
|
||||
}
|
||||
return Enumerable.Empty<SqlSmoObject>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,10 @@
|
||||
<NavigationPath Parent="Table" Field="Columns" SubField="DefaultConstraint" FieldType="Column" />
|
||||
<NavigationPath Parent="UserDefinedTableType" Field="Columns" SubField="DefaultConstraint" FieldType="Column" />
|
||||
</Node>
|
||||
<Node Name="SqlDmlTrigger" Type="Trigger" Parent="Table" ValidFor="NotSqlDw" />
|
||||
<Node Name="SqlDmlTrigger" Type="Trigger" ValidFor="NotSqlDw">
|
||||
<Parent>Table</Parent>
|
||||
<Parent>View</Parent>
|
||||
</Node>
|
||||
<Node Name="SqlFullTextIndex" Parent="Table" Collection="False" ValidFor="NotSqlDw" />
|
||||
<Node Name="SqlStatistic" Parent="TableViewBase"/>
|
||||
|
||||
|
||||
@@ -116,6 +116,7 @@ NodeType: Column Label: LastName (Name(nvarchar), not null) SubType: Status:
|
||||
NodeType: Column Label: Suffix (nvarchar(10), null) SubType: Status:
|
||||
NodeType: Column Label: JobTitle (nvarchar(50), not null) SubType: Status:
|
||||
NodeType: Column Label: AdditionalContactInfo (AdditionalContactInfoSchemaCollection, null) SubType: Status:
|
||||
NodeType: Trigger Label: ViewTrigger SubType: Status:
|
||||
NodeType: Synonym Label: dbo.MyProduct SubType: Status:
|
||||
NodeType: StoredProcedure Label: dbo.uspGetList SubType: Status:
|
||||
NodeType: StoredProcedureParameter Label: @Product (varchar, Input, No default) SubType:Input Status:
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user