Skip to content

Commit

Permalink
Add getOptionKeyIdNames to IConnectionProfile (#23262) (#23268)
Browse files Browse the repository at this point in the history
  • Loading branch information
kburtram authored May 31, 2023
1 parent a3fc0eb commit cdf76a9
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/sql/platform/connection/common/connectionProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ export class ConnectionProfile extends ProviderConnectionInfo implements interfa
databaseName: this.databaseName,
authenticationType: this.authenticationType,
getOptionsKey: this.getOptionsKey,
getOptionKeyIdNames: this.getOptionKeyIdNames,
matches: this.matches,
groupId: this.groupId,
groupFullName: this.groupFullName,
Expand Down
1 change: 1 addition & 0 deletions src/sql/platform/connection/common/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type ProfileMatcher = (a: IConnectionProfile, b: IConnectionProfile) => b

export interface IConnectionProfile extends azdata.IConnectionProfile {
getOptionsKey(): string;
getOptionKeyIdNames(): string[];
matches(profile: azdata.IConnectionProfile): boolean;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ suite('ConnectionConfig', () => {
groupFullName: undefined,
groupId: undefined,
getOptionsKey: undefined!,
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: 'MSSQL',
options: {},
Expand Down Expand Up @@ -309,6 +310,7 @@ suite('ConnectionConfig', () => {
savePassword: true,
groupFullName: undefined,
getOptionsKey: undefined!,
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: 'MSSQL',
options: {},
Expand Down Expand Up @@ -341,6 +343,7 @@ suite('ConnectionConfig', () => {
groupFullName: 'g2/g2-2',
groupId: undefined,
getOptionsKey: undefined!,
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: 'MSSQL',
options: {},
Expand Down Expand Up @@ -484,6 +487,7 @@ suite('ConnectionConfig', () => {
groupFullName: 'g3',
groupId: 'g3',
getOptionsKey: undefined!,
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: 'MSSQL',
options: {},
Expand Down Expand Up @@ -514,6 +518,7 @@ suite('ConnectionConfig', () => {
groupFullName: 'g3',
groupId: 'g3',
getOptionsKey: undefined!,
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: 'MSSQL',
options: {},
Expand Down Expand Up @@ -551,6 +556,7 @@ suite('ConnectionConfig', () => {
groupFullName: 'g3',
groupId: 'newid',
getOptionsKey: undefined!,
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: 'MSSQL',
options: {},
Expand Down Expand Up @@ -631,6 +637,7 @@ suite('ConnectionConfig', () => {
groupFullName: 'g3',
groupId: 'g3',
getOptionsKey: () => { return 'connectionId'; },
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: 'MSSQL',
options: {},
Expand All @@ -648,6 +655,7 @@ suite('ConnectionConfig', () => {
groupFullName: 'test',
groupId: 'test',
getOptionsKey: () => { return 'connectionId'; },
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: 'MSSQL',
options: {},
Expand Down Expand Up @@ -688,6 +696,7 @@ suite('ConnectionConfig', () => {
groupFullName: 'g3',
groupId: 'g3',
getOptionsKey: () => { return 'connectionId'; },
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: 'MSSQL',
options: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ suite('SQL ConnectionProfileInfo tests', () => {
groupFullName: 'g2/g2-2',
groupId: 'group id',
getOptionsKey: undefined!,
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: mssqlProviderName,
options: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ suite('ConnectionStore', () => {
groupId: '',
groupFullName: '',
getOptionsKey: undefined!,
getOptionKeyIdNames: undefined!,
matches: () => false,
providerName: mssqlProviderName,
options: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ suite('SQL ProviderConnectionInfo tests', () => {
groupFullName: 'g2/g2-2',
groupId: undefined,
getOptionsKey: undefined!,
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: mssqlProviderName,
options: undefined!,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ let connectionProfile: IConnectionProfile = {
groupFullName: 'g2/g2-2',
groupId: 'group id',
getOptionsKey: () => 'connection1',
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: mssqlProviderName,
options: {},
Expand All @@ -44,6 +45,7 @@ let editorConnectionProfile: IConnectionProfile = {
groupFullName: 'g2/g2-2',
groupId: 'group id',
getOptionsKey: () => 'connection2',
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: mssqlProviderName,
options: {},
Expand All @@ -61,6 +63,7 @@ let connectionProfileWithoutDbName: IConnectionProfile = {
groupFullName: 'g2/g2-2',
groupId: 'group id',
getOptionsKey: () => 'connection1',
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: mssqlProviderName,
options: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ suite('SQL ConnectionManagementService tests', () => {
groupFullName: 'g2/g2-2',
groupId: 'group id',
getOptionsKey: () => { return 'connectionId'; },
getOptionKeyIdNames: undefined!,
matches: undefined,
providerName: 'MSSQL',
options: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ suite('Insights Dialog Controller Tests', () => {
groupFullName: '',
groupId: '',
getOptionsKey: () => '',
getOptionKeyIdNames: undefined!,
matches: undefined,
providerName: '',
saveProfile: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ suite('AsyncServerTreeDragAndDrop', () => {
groupFullName: 'g2/g2-2',
groupId: 'group id',
getOptionsKey: undefined!,
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: mssqlProviderName,
options: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ suite('SQL Drag And Drop Controller tests', () => {
groupFullName: 'g2/g2-2',
groupId: 'group id',
getOptionsKey: undefined!,
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: mssqlProviderName,
options: {},
Expand All @@ -59,6 +60,7 @@ suite('SQL Drag And Drop Controller tests', () => {
groupFullName: 'g2/g2-2',
groupId: 'group id',
getOptionsKey: undefined!,
getOptionKeyIdNames: undefined!,
matches: undefined!,
providerName: pgsqlProviderName,
options: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ suite('Firewall rule dialog controller tests', () => {
groupFullName: 'g2/g2-2',
groupId: 'group id',
getOptionsKey: () => '',
getOptionKeyIdNames: undefined!,
matches: () => false,
providerName: mssqlProviderName,
options: {},
Expand Down

0 comments on commit cdf76a9

Please sign in to comment.