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;
}

View File

@@ -29,7 +29,7 @@ NodeType: Constraint Label: CK_Employee_VacationHours SubType: Status:
NodeType: Index Label: NonClusteredIndex-Login (Non-Unique, Non-Clustered) SubType: Status:
NodeType: Statistic Label: NonClusteredIndex-Login SubType: Status:
NodeType: Statistic Label: PK_Employee_BusinessEntityID SubType: Status:
NodeType: Table Label: HumanResources.Employee_Temporal (System-Versioned) SubType: Status:
NodeType: Table Label: HumanResources.Employee_Temporal SubType: Status:
NodeType: Column Label: BusinessEntityID (PK, int, not null) SubType: Status:
NodeType: Column Label: NationalIDNumber (nvarchar(15), not null) SubType: Status:
NodeType: Column Label: LoginID (nvarchar(256), not null) SubType: Status: