setting selected db name in drop down to current connection db name (#11912)

This commit is contained in:
Leila Lali
2020-08-31 14:44:08 -07:00
committed by GitHub
parent 81e81f1c49
commit 22c88cdd2e
8 changed files with 95 additions and 16 deletions

View File

@@ -35,6 +35,14 @@ export abstract class SqlPackageManageProviderBase {
return [];
}
/**
* Returns database name as current location
*/
public async getCurrentLocation(): Promise<string | undefined> {
let connection = await this.getCurrentConnection();
return connection?.databaseName;
}
protected async getCurrentConnection(): Promise<azdata.connection.ConnectionProfile> {
return await this._apiWrapper.getCurrentConnection();
}

View File

@@ -99,6 +99,11 @@ export interface IPackageManageProvider {
*/
getLocations(): Promise<IPackageLocation[]>;
/**
* Get the current location
*/
getCurrentLocation(): Promise<string | undefined>;
/**
* Returns Package Overview
* @param packageName package name