getConnections API (#5651)

* getConnections

* update

* fix the condition check

* pr feedback

* fix test cases

* add test for the new method

* address comments
This commit is contained in:
Alan Ren
2019-06-19 22:51:53 -07:00
committed by GitHub
parent 47cf496c36
commit b9a0c9ce7e
12 changed files with 201 additions and 9 deletions

View File

@@ -99,9 +99,13 @@ export function createApiFactory(
getCurrentConnection(): Thenable<azdata.connection.ConnectionProfile> {
return extHostConnectionManagement.$getCurrentConnection();
},
getConnections(activeConnectionsOnly?: boolean): Thenable<azdata.connection.ConnectionProfile[]> {
return extHostConnectionManagement.$getConnections(activeConnectionsOnly);
},
// "sqlops" back-compat APIs
getActiveConnections(): Thenable<azdata.connection.Connection[]> {
console.warn('the method azdata.connection.getActiveConnections has been deprecated, replace it with azdata.connection.getConnections');
return extHostConnectionManagement.$getActiveConnections();
},
getCredentials(connectionId: string): Thenable<{ [name: string]: string }> {