mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 09:35:37 -05:00
Bring in all the extensibility updates we added during the hackathon (#2056)
Extensibility updates
This commit is contained in:
@@ -49,6 +49,18 @@ export class MainThreadConnectionManagement implements MainThreadConnectionManag
|
||||
return Promise.resolve(this._connectionManagementService.getActiveConnectionCredentials(connectionId));
|
||||
}
|
||||
|
||||
public async $listDatabases(connectionId: string): Promise<string[]> {
|
||||
let connection = this._connectionManagementService.getActiveConnections().find(profile => profile.id === connectionId);
|
||||
let connectionUri = this._connectionManagementService.getConnectionId(connection);
|
||||
let result = await this._connectionManagementService.listDatabases(connectionUri);
|
||||
return result.databaseNames;
|
||||
}
|
||||
|
||||
public $getUriForConnection(connectionId: string): Thenable<string> {
|
||||
let connection = this._connectionManagementService.getActiveConnections().find(profile => profile.id === connectionId);
|
||||
return Promise.resolve(this._connectionManagementService.getConnectionId(connection));
|
||||
}
|
||||
|
||||
private convertConnection(profile: IConnectionProfile): sqlops.connection.Connection {
|
||||
if (!profile) {
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user