-
Notifications
You must be signed in to change notification settings - Fork 906
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into corivera/remoteFiles
- Loading branch information
Showing
94 changed files
with
5,763 additions
and
844 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,9 +75,9 @@ [email protected]: | |
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" | ||
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= | ||
|
||
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.6": | ||
version "1.3.6" | ||
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/fdd415fd7c79c5c889f192a9122ba41dca66b35b" | ||
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.7": | ||
version "1.3.7" | ||
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/0f07d03394eeebc2924971746470ac8224348fa4" | ||
dependencies: | ||
vscode-languageclient "5.2.1" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -497,9 +497,9 @@ [email protected]: | |
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" | ||
integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== | ||
|
||
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.6": | ||
version "1.3.6" | ||
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/fdd415fd7c79c5c889f192a9122ba41dca66b35b" | ||
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.7": | ||
version "1.3.7" | ||
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/0f07d03394eeebc2924971746470ac8224348fa4" | ||
dependencies: | ||
vscode-languageclient "5.2.1" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,9 +124,9 @@ [email protected]: | |
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" | ||
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= | ||
|
||
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.6": | ||
version "1.3.6" | ||
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/fdd415fd7c79c5c889f192a9122ba41dca66b35b" | ||
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.7": | ||
version "1.3.7" | ||
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/0f07d03394eeebc2924971746470ac8224348fa4" | ||
dependencies: | ||
vscode-languageclient "5.2.1" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the Source EULA. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import { AppContext } from '../appContext'; | ||
import * as vscode from 'vscode'; | ||
import * as constants from './constants'; | ||
import { ConnectionService } from './connectionService'; | ||
|
||
export function registerConnectionCommands(appContext: AppContext) { | ||
appContext.extensionContext.subscriptions.push(vscode.commands.registerCommand('mssql.clearPooledConnections', async () => { | ||
await getConnectionService(appContext).clearPooledConnections(); | ||
})); | ||
} | ||
|
||
function getConnectionService(appContext: AppContext): ConnectionService { | ||
return appContext.getService<ConnectionService>(constants.ConnectionService); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the Source EULA. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import * as constants from './constants'; | ||
import * as contracts from '../contracts'; | ||
|
||
import { BaseService, ISqlOpsFeature, SqlOpsDataClient } from 'dataprotocol-client'; | ||
import { ClientCapabilities } from 'vscode-languageclient'; | ||
import { AppContext } from '../appContext'; | ||
|
||
export class ConnectionService extends BaseService { | ||
public static asFeature(context: AppContext): ISqlOpsFeature { | ||
return class extends ConnectionService { | ||
constructor(client: SqlOpsDataClient) { | ||
super(context, client); | ||
} | ||
|
||
fillClientCapabilities(_: ClientCapabilities): void { } | ||
initialize(): void { } | ||
}; | ||
} | ||
|
||
private constructor(context: AppContext, client: SqlOpsDataClient) { | ||
super(client); | ||
context.registerService(constants.ConnectionService, this); | ||
} | ||
|
||
async clearPooledConnections(): Promise<void> { | ||
return this.runWithErrorHandling(contracts.ClearPooledConnectionsRequest.type, {}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the Source EULA. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
export const ConnectionService = 'ConnectionService'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.