fix the problem with history tables as table children (#335)

This commit is contained in:
Leila Lali
2017-05-03 11:28:18 -07:00
committed by GitHub
parent f50f30b493
commit 5b5c5861d8
8 changed files with 192 additions and 77 deletions

View File

@@ -0,0 +1,23 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlServer.Management.Smo;
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
/// <summary>
/// Filters the history tables to only return ones related to the parent table
/// </summary>
internal partial class SqlHistoryTableQuerier : SmoQuerier
{
protected override bool PassesFinalFilters(SqlSmoObject parent, SqlSmoObject smoObject)
{
Table parentTable = parent as Table;
Table historyTable = smoObject as Table;
return (parentTable.HistoryTableID == historyTable.ID);
}
}
}