From abf11c36affe54f5a727b01a5713d551e755af86 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com> Date: Mon, 18 Sep 2023 23:10:23 -0700 Subject: [PATCH] Support select execution on History Table (#24464) --- .../contrib/scripting/browser/scripting.contribution.ts | 1 + .../services/objectExplorer/browser/mssqlNodeContext.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts b/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts index 49a77aabec..d8ec94853f 100644 --- a/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts +++ b/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts @@ -105,6 +105,7 @@ MenuRegistry.appendMenuItem(MenuId.ObjectExplorerItemContext, { ConnectionContextKey.Provider.notEqualsTo('KUSTO'), ConnectionContextKey.Provider.notEqualsTo('LOGANALYTICS'), ContextKeyExpr.or( + TreeNodeContextKey.NodeType.isEqualTo(NodeType.HistoryTable), TreeNodeContextKey.NodeType.isEqualTo(NodeType.Table), TreeNodeContextKey.NodeType.isEqualTo(NodeType.View) ) diff --git a/src/sql/workbench/services/objectExplorer/browser/mssqlNodeContext.ts b/src/sql/workbench/services/objectExplorer/browser/mssqlNodeContext.ts index a218b4c935..cc7a2d85c0 100644 --- a/src/sql/workbench/services/objectExplorer/browser/mssqlNodeContext.ts +++ b/src/sql/workbench/services/objectExplorer/browser/mssqlNodeContext.ts @@ -28,7 +28,7 @@ export interface INodeContextValue { */ export class MssqlNodeContext extends Disposable { - static readonly canSelect = new Set([NodeType.Table, NodeType.View]); + static readonly canSelect = new Set([NodeType.HistoryTable, NodeType.Table, NodeType.View]); static readonly canEditData = new Set([NodeType.Table]); static readonly canCreateOrDelete = new Set([NodeType.AggregateFunction, NodeType.PartitionFunction, NodeType.ScalarValuedFunction, NodeType.Schema, NodeType.StoredProcedure, NodeType.Table, NodeType.TableValuedFunction,