Initial support for SQLCMD variables in sql project tree (#21574)

* initial changes

* sqlcmd node showing in tree

* Add edit sqlcmdvar command

* remove commands on sqlcmd vars  for now

* cleanup

* fix tests

* add icons

* remove TestProject

* add checks for undefined

* add variable
This commit is contained in:
Kim Santiago
2023-01-25 10:19:39 -08:00
committed by GitHub
parent a63f43088e
commit 17949b9d03
9 changed files with 105 additions and 4 deletions

View File

@@ -79,6 +79,7 @@ export const refreshDataWorkspaceCommand = 'dataworkspace.refresh';
// UI Strings
export const dataSourcesNodeName = localize('dataSourcesNodeName', "Data Sources");
export const databaseReferencesNodeName = localize('databaseReferencesNodeName', "Database References");
export const sqlcmdVariablesNodeName = localize('sqlcmdVariablesNodeName', "SQLCMD Variables");
export const sqlConnectionStringFriendly = localize('sqlConnectionStringFriendly', "SQL connection string");
export const yesString = localize('yesString', "Yes");
export const openEulaString = localize('openEulaString', "Open License Agreement");
@@ -553,6 +554,8 @@ export enum DatabaseProjectItemType {
referencesRoot = 'databaseProject.itemType.referencesRoot',
reference = 'databaseProject.itemType.reference',
dataSourceRoot = 'databaseProject.itemType.dataSourceRoot',
sqlcmdVariablesRoot = 'databaseProject.itemType.sqlcmdVariablesRoot',
sqlcmdVariable = 'databaseProject.itemType.sqlcmdVariable'
}
// AutoRest

View File

@@ -24,6 +24,9 @@ export class IconPathHelper {
public static referenceGroup: IconPath;
public static referenceDatabase: IconPath;
public static sqlCmdVariablesGroup: IconPath;
public static sqlCmdVariable: IconPath;
public static refresh: IconPath;
public static folder_blue: IconPath;
public static selectConnection: IconPath;
@@ -57,6 +60,9 @@ export class IconPathHelper {
IconPathHelper.referenceGroup = IconPathHelper.makeIcon('referenceGroup');
IconPathHelper.referenceDatabase = IconPathHelper.makeIcon('reference-database');
IconPathHelper.sqlCmdVariablesGroup = IconPathHelper.makeIcon('symbol-string');
IconPathHelper.sqlCmdVariable = IconPathHelper.makeIcon('symbol-variable');
IconPathHelper.refresh = IconPathHelper.makeIcon('refresh', true);
IconPathHelper.folder_blue = IconPathHelper.makeIcon('folder_blue', true);
IconPathHelper.selectConnection = IconPathHelper.makeIcon('selectConnection', true);