temporary fix to make oe tables expanding faster (#343)

This commit is contained in:
Leila Lali
2017-05-12 09:31:23 -07:00
committed by GitHub
parent ed978fe5b7
commit 327f0a5edd
2 changed files with 8 additions and 6 deletions

View File

@@ -14,11 +14,13 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
public override string GetNodeCustomName(object smoObject, SmoQueryContext smoContext)
{
Table table = smoObject as Table;
if (table != null && table.IsSystemVersioned)
{
return $"{table.Schema}.{table.Name} ({SR.SystemVersioned_LabelPart})";
}
// TODO: this code makes expanding the tables slow because of loading the IsSystemVersioned property for each table.
// Have to uncomment this after optimizing the way properties are loaded for SMO objects
//Table table = smoObject as Table;
//if (table != null && table.IsSystemVersioned)
//{
// return $"{table.Schema}.{table.Name} ({SR.SystemVersioned_LabelPart})";
//}
return string.Empty;
}