mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-15 17:23:32 -05:00
fixed the bug with not closing data reader for oe (#352)
* fixed the bug with not closing data reader for oe * fixed the bug with triggers not sending back status
This commit is contained in:
@@ -10,14 +10,27 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
/// <summary>
|
||||
/// Status for triggers
|
||||
/// </summary>
|
||||
public class SmoTriggerCustomNode
|
||||
internal partial class TriggersChildFactory : SmoChildFactoryBase
|
||||
{
|
||||
internal partial class TriggersChildFactory : SmoChildFactoryBase
|
||||
public override string GetNodeStatus(object context)
|
||||
{
|
||||
public override string GetNodeStatus(object context)
|
||||
{
|
||||
return TriggersCustomeNodeHelper.GetStatus(context);
|
||||
}
|
||||
return TriggersCustomeNodeHelper.GetStatus(context);
|
||||
}
|
||||
}
|
||||
|
||||
internal partial class ServerLevelServerTriggersChildFactory : SmoChildFactoryBase
|
||||
{
|
||||
public override string GetNodeStatus(object context)
|
||||
{
|
||||
return TriggersCustomeNodeHelper.GetStatus(context);
|
||||
}
|
||||
}
|
||||
|
||||
internal partial class DatabaseTriggersChildFactory : SmoChildFactoryBase
|
||||
{
|
||||
public override string GetNodeStatus(object context)
|
||||
{
|
||||
return TriggersCustomeNodeHelper.GetStatus(context);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +47,24 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
}
|
||||
}
|
||||
|
||||
ServerDdlTrigger serverDdlTrigger = context as ServerDdlTrigger;
|
||||
if (serverDdlTrigger != null)
|
||||
{
|
||||
if (!serverDdlTrigger.IsEnabled)
|
||||
{
|
||||
return "Disabled";
|
||||
}
|
||||
}
|
||||
|
||||
DatabaseDdlTrigger databaseDdlTrigger = context as DatabaseDdlTrigger;
|
||||
if (databaseDdlTrigger != null)
|
||||
{
|
||||
if (!databaseDdlTrigger.IsEnabled)
|
||||
{
|
||||
return "Disabled";
|
||||
}
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user