mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-12 19:18:32 -05:00
setting selected db name in drop down to current connection db name (#11912)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user