Allow 'ApplicationName' to be specified for MSSQL connections (#22890)

This commit is contained in:
Cheena Malhotra
2023-05-01 10:55:05 -07:00
committed by GitHub
parent f4952c76b8
commit ea6bb41f45
12 changed files with 81 additions and 39 deletions

View File

@@ -41,6 +41,7 @@ export interface SqlArgs {
aad?: boolean; // deprecated - used by SSMS - authenticationType should be used instead
integrated?: boolean; // deprecated - used by SSMS - authenticationType should be used instead.
showDashboard?: boolean;
applicationName?: string;
}
//#region decorators
@@ -307,7 +308,10 @@ export class CommandLineWorkbenchContribution implements IWorkbenchContribution,
Constants.AuthenticationType.Integrated;
profile.connectionName = '';
profile.setOptionValue('applicationName', Constants.applicationName);
const applicationName = args.applicationName
? args.applicationName + '-' + Constants.applicationName
: Constants.applicationName;
profile.setOptionValue('applicationName', applicationName);
profile.setOptionValue('databaseDisplayName', profile.databaseName);
profile.setOptionValue('groupId', profile.groupId);
return this._connectionManagementService ? this.tryMatchSavedProfile(profile) : profile;