Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating with main #24376

Merged
merged 60 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
e4abe4d
Add Attach Database dialog (#24225)
corivera Aug 30, 2023
41202a6
Enabling FILEGROUPS tab experience to the database properties (#24226)
ssreerama Aug 31, 2023
5449d97
[Loc] update to MSSQL xlf for 8-30-2023 (#24253)
smartguest Aug 31, 2023
0703eff
Pass through database names to enable connection cleanup (#24251)
corivera Aug 31, 2023
9c99d50
Juno: check in to lego/hb_04604851-bac4-4681-9f74-73de611d6e48_202308…
csigs Aug 31, 2023
c695c5f
Add database settings tab (#24260)
barbaravaldez Aug 31, 2023
f8cd52f
[Loc] update to MSSQL xlf for 8-31-2023 (#24261)
smartguest Sep 1, 2023
6556eaa
Revalidate failed IR Validation steps (#24237)
Ramudaykumar Sep 1, 2023
e3d0670
Bump STS version to 4.9.0.28 (#24264)
lewis-sanchez Sep 1, 2023
5152823
Send server contextualization to Copilot extension (#24230)
lewis-sanchez Sep 1, 2023
7ea6349
Fix comment block footer (#24268)
lewis-sanchez Sep 1, 2023
a390390
Juno: check in to lego/hb_04604851-bac4-4681-9f74-73de611d6e48_202309…
csigs Sep 1, 2023
2d3b4a5
Adds logging to contextualization service (#24269)
lewis-sanchez Sep 1, 2023
d2668d8
Adds xml-langauge-features extension back (#24271)
lewis-sanchez Sep 1, 2023
e05ee98
Add advanced tab (#24267)
barbaravaldez Sep 1, 2023
519411c
Update IR Revalidation button to accurate name (#24283)
Ramudaykumar Sep 4, 2023
45440d2
add ai key to fix undefined error (#24279)
cssuh Sep 5, 2023
6397f2d
Juno: check in to lego/hb_04604851-bac4-4681-9f74-73de611d6e48_202309…
csigs Sep 5, 2023
b43a3a6
bumping STS (#24273)
Benjin Sep 5, 2023
cceb0ba
Add loading indicator when an XEL File is opened (#24274)
SakshiS-harma Sep 5, 2023
6236399
bump sts (#24288)
barbaravaldez Sep 5, 2023
ec91de7
Update task labels for Attach, Detach, and Drop Database (#24289)
corivera Sep 5, 2023
1b10281
Bump STS version to 4.9.0.32 (#24291)
lewis-sanchez Sep 6, 2023
306af56
Consolidate 2 context endpoints to just one (#24276)
lewis-sanchez Sep 6, 2023
07059ef
[Loc] update to mssql and sql-migration xlfs for 9-5-2023 (#24292)
smartguest Sep 6, 2023
dfc0ce6
Added fix to drag and drop (#24252)
smartguest Sep 6, 2023
52a7607
Adding Query Store Service bindings on ADS side (#24167)
Benjin Sep 6, 2023
9f4e19f
Initial changes for query store dashboard (#24272)
kisantia Sep 6, 2023
32817ae
Handle undefined nodeInfo for top-level database objects (#24298)
corivera Sep 6, 2023
77ea6d7
do not show individual processors in managed instance (#24302)
barbaravaldez Sep 6, 2023
db3ea9a
[Loc] xlf update for 9-6-2023 (#24324)
smartguest Sep 7, 2023
339c456
SQL-Migration Extension Version bump-up (#24326)
Ramudaykumar Sep 7, 2023
af00e94
Adding additional info to sample readme, updating product strings (#2…
Benjin Sep 7, 2023
839d8b2
Fix F11 key binding (#24323)
SakshiS-harma Sep 7, 2023
21016c1
add button to open query store report in new tab (#24303)
kisantia Sep 7, 2023
63a1383
cleanup casing in a couple files (#24333)
kisantia Sep 7, 2023
863eb00
Mark carbon edit with begin and end tags (#24336)
lewis-sanchez Sep 7, 2023
b70f6ad
Add Open file location as an option after an excel file is saved (#24…
SakshiS-harma Sep 7, 2023
51f84ee
Organizing code to be easier to follow (#24332)
Benjin Sep 7, 2023
594aabb
Bump electron from 22.3.14 to 22.3.21 (#24299)
dependabot[bot] Sep 7, 2023
aa006b9
Enabling QueryStore options to the database properties (#24255)
ssreerama Sep 8, 2023
22d31af
Add visible newlines to display value for Edit Data cells (#24334)
smartguest Sep 8, 2023
80f7049
[Loc] final XLF update prior to code complete for 9-7-2023 (#24337)
smartguest Sep 8, 2023
a5d3833
Fixes a typo in headerfilter plugin (#24342)
cheenamalhotra Sep 8, 2023
5fdac20
Add support for clearing pooled connections (#24325)
cheenamalhotra Sep 8, 2023
118e726
Revert the changes of row fileGroup table which was added accidentall…
ssreerama Sep 8, 2023
49021be
Bump STS version to 4.9.0.36 (#24349)
lewis-sanchez Sep 8, 2023
1f98dad
Update required indicators in Add Database Reference Dialog (#24346)
SakshiS-harma Sep 8, 2023
ff4758c
Remove 'Script As Alter' command and don't show for table nodes (#24352)
cheenamalhotra Sep 8, 2023
faebec9
Juno: check in to lego/hb_04604851-bac4-4681-9f74-73de611d6e48_202309…
csigs Sep 8, 2023
29127a0
Update placeholder text for mssql server name (#24350)
cheenamalhotra Sep 8, 2023
669d649
[Loc] update to MSSQL xlf for 9-8-2023 (#24354)
smartguest Sep 9, 2023
0b149cd
update STS to 4.9.0.37 (#24356)
kisantia Sep 9, 2023
4a9feed
Notify user to restart server (#24351)
barbaravaldez Sep 9, 2023
b862959
Fix some of the issues found in the bug bash (#24348)
barbaravaldez Sep 9, 2023
5f45c00
Fix copy on Linux (#24341)
cssuh Sep 9, 2023
1547777
Add serverless DW platform (#24246)
zijchen Sep 10, 2023
e24ad67
Juno: check in to lego/hb_04604851-bac4-4681-9f74-73de611d6e48_202309…
csigs Sep 10, 2023
f940e93
Juno: check in to lego/hb_04604851-bac4-4681-9f74-73de611d6e48_202309…
csigs Sep 11, 2023
89e4157
updating release version in main post release branch split (#24374)
erpett Sep 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/npm/dirs.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const dirs = [
'extensions/sql-database-projects',
'extensions/sql-migration',
'extensions/vscode-test-resolver',
'extensions/xml-language-features',
// {{SQL CARBON EDIT}} - End
'remote',
'remote/web',
Expand Down
1 change: 1 addition & 0 deletions extensions/azurecore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"version": "0.1.0",
"publisher": "Microsoft",
"preview": true,
"aiKey": "29a207bb14f84905966a8f22524cb730-25407f35-11b6-4d4e-8114-ab9e843cb52f-7380",
"engines": {
"vscode": "^1.30.1",
"azdata": "*"
Expand Down
2 changes: 1 addition & 1 deletion extensions/azuremonitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"update-grammar": "node ../../build/npm/update-grammar.js Microsoft/vscode-azuremonitor ./syntaxes/azuremonitor.tmLanguage"
},
"dependencies": {
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.6",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.7",
"figures": "^2.0.0",
"find-remove": "1.2.1",
"@microsoft/ads-service-downloader": "^1.2.1",
Expand Down
6 changes: 3 additions & 3 deletions extensions/azuremonitor/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
8 changes: 4 additions & 4 deletions extensions/data-workspace/src/common/promise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export class Deferred<T = void> {
});
}

then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult> {
return this.promise.then(onfulfilled, onrejected);
then<TResult>(onFulfilled?: (value: T) => TResult | Thenable<TResult>, onRejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
then<TResult>(onFulfilled?: (value: T) => TResult | Thenable<TResult>, onRejected?: (reason: any) => void): Thenable<TResult>;
then<TResult>(onFulfilled?: (value: T) => TResult | Thenable<TResult>, onRejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult> {
return this.promise.then(onFulfilled, onRejected);
}
}
2 changes: 1 addition & 1 deletion extensions/datavirtualization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"dependencies": {
"@microsoft/ads-extension-telemetry": "^3.0.1",
"@microsoft/ads-service-downloader": "^1.2.1",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.6",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.7",
"vscode-nls": "^5.2.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions extensions/datavirtualization/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion extensions/import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
}
},
"dependencies": {
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.6",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.7",
"htmlparser2": "^3.10.1",
"@microsoft/ads-service-downloader": "^1.2.1",
"@microsoft/ads-extension-telemetry": "^3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion extensions/import/src/test/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class TestQueryProvider implements azdata.QueryProvider {
saveResults(requestParams: azdata.SaveResultsRequestParams): Thenable<azdata.SaveResultRequestResult> {
throw new Error('Method not implemented.');
}
copyResults(requestParams: azdata.CopyResultsRequestParams): Thenable<void> {
copyResults(requestParams: azdata.CopyResultsRequestParams): Thenable<azdata.CopyResultsRequestResult> {
throw new Error('Method not implemented.');
}
setQueryExecutionOptions(ownerUri: string, options: azdata.QueryExecutionOptions): Thenable<void> {
Expand Down
6 changes: 3 additions & 3 deletions extensions/import/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,9 @@ crypt@~0.0.1:
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=

"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"

Expand Down
2 changes: 1 addition & 1 deletion extensions/kusto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
}
},
"dependencies": {
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.6",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.7",
"figures": "^2.0.0",
"find-remove": "1.2.1",
"@microsoft/ads-service-downloader": "^1.2.1",
Expand Down
6 changes: 3 additions & 3 deletions extensions/kusto/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion extensions/mssql/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
"version": "4.9.0.25",
"version": "4.9.0.37",
"downloadFileNames": {
"Windows_86": "win-x86-net7.0.zip",
"Windows_64": "win-x64-net7.0.zip",
Expand Down
29 changes: 19 additions & 10 deletions extensions/mssql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
}
],
"commands": [
{
"command": "objectExplorer.scriptAsAlter",
"title": "Script as Alter"
},
{
"command": "mssql.exportSqlAsNotebook",
"title": "%mssql.exportSqlAsNotebook%"
Expand Down Expand Up @@ -117,6 +113,11 @@
"category": "MSSQL",
"title": "%title.detachDatabase%"
},
{
"command": "mssql.attachDatabase",
"category": "MSSQL",
"title": "%title.attachDatabase%"
},
{
"command": "mssql.enableGroupBySchema",
"category": "MSSQL",
Expand Down Expand Up @@ -152,6 +153,10 @@
"dark": "resources/dark/groupBySchemaDisabled_inverse.svg",
"light": "resources/light/groupBySchemaDisabled.svg"
}
},
{
"command": "mssql.clearPooledConnections",
"title": "%mssql.connection.clearPooledConnections%"
}
],
"outputChannels": [
Expand Down Expand Up @@ -525,14 +530,13 @@
{
"command": "mssql.detachDatabase",
"when": "false"
},
{
"command": "mssql.attachDatabase",
"when": "false"
}
],
"objectExplorer/item/context": [
{
"command": "objectExplorer.scriptAsAlter",
"when": "nodeType == Table",
"group": "0_query@5"
},
{
"command": "mssql.designTable",
"when": "connectionProvider == MSSQL && nodeType == Table && nodeSubType != LedgerDropped",
Expand Down Expand Up @@ -579,6 +583,11 @@
"when": "connectionProvider == MSSQL && nodeType == Database && !isCloud && !(nodePath =~ /^.*\\/System Databases\\/.*$/) && config.workbench.enablePreviewFeatures && (productQualityType =~ /^(insider|dev)$/ || isDevelopment)",
"group": "1_objectManagement@2"
},
{
"command": "mssql.attachDatabase",
"when": "connectionProvider == MSSQL && nodeType == Folder && objectType == Databases && !isCloud && config.workbench.enablePreviewFeatures",
"group": "1_objectManagement@2"
},
{
"command": "mssql.dropDatabase",
"when": "connectionProvider == MSSQL && nodeType == Database && !(nodePath =~ /^.*\\/System Databases\\/.*$/) && config.workbench.enablePreviewFeatures",
Expand Down Expand Up @@ -1558,7 +1567,7 @@
"dependencies": {
"@microsoft/ads-extension-telemetry": "^3.0.1",
"@microsoft/ads-service-downloader": "^1.2.1",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.6",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.7",
"find-remove": "1.2.1",
"vscode-languageclient": "5.2.1",
"vscode-nls": "^4.0.0"
Expand Down
8 changes: 5 additions & 3 deletions extensions/mssql/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"mssql.connectionOptions.connectionName.description": "Custom name of the connection",
"mssql.connectionOptions.serverName.displayName": "Server",
"mssql.connectionOptions.serverName.description": "Name of the SQL Server instance",
"mssql.connectionOptions.serverName.placeholder": "e.g. tcp:servername,1433",
"mssql.connectionOptions.serverName.placeholder": "e.g. servername,port",
"mssql.connectionOptions.databaseName.displayName": "Database",
"mssql.connectionOptions.databaseName.description": "The name of the initial catalog or database int the data source",
"mssql.connectionOptions.authType.displayName": "Authentication type",
Expand Down Expand Up @@ -174,9 +174,10 @@
"title.newTable": "New Table",
"title.designTable": "Design",
"title.changeNotebookConnection": "Change SQL Notebook Connection",
"mssql.connection.clearPooledConnections": "SQL Server: Clear Pooled Connections",
"mssql.parallelMessageProcessing": "[Experimental] Whether the requests to the SQL Tools Service should be handled in parallel. This is introduced to discover the issues there might be when handling all requests in parallel. The default value is false. Azure Data Studio is required to be relaunched when the value is changed.",
"mssql.enableSqlAuthenticationProvider": "Enables use of the Sql Authentication Provider for 'Active Directory Interactive' authentication mode when user selects 'AzureMFA' authentication. This enables Server-side resource endpoint integration when fetching access tokens. This option is only supported for 'MSAL' Azure Authentication Library. Azure Data Studio is required to be relaunched when the value is changed.",
"mssql.enableConnectionPooling": "Enables connection pooling on MSSQL connections to improve overall performance of Azure Data Studio connectivity. This setting is enabled by default. Azure Data Studio is required to be relaunched when the value is changed.",
"mssql.enableConnectionPooling": "Enables connection pooling on MSSQL connections to improve overall performance of Azure Data Studio connectivity. This setting is enabled by default. Azure Data Studio is required to be relaunched when the value is changed. To clear pooled connections, run the command: 'SQL Server: Clear Pooled Connections'",
"mssql.tableDesigner.preloadDatabaseModel": "Whether to preload the database model when the database node in the object explorer is expanded. When enabled, the loading time of table designer can be reduced. Note: You might see higher than normal memory usage if you need to expand a lot of database nodes.",
"mssql.tableDesigner.allowDisableAndReenableDdlTriggers": "Whether to allow table designer to disable and re-enable DDL triggers during publish",
"mssql.objectExplorer.groupBySchema": "When enabled, the database objects in Object Explorer will be categorized by schema.",
Expand All @@ -190,5 +191,6 @@
"title.objectProperties": "Properties (Preview)",
"title.dropObject": "Drop (Preview)",
"title.renameObject": "Rename (Preview)",
"title.detachDatabase": "Detach (Preview)"
"title.detachDatabase": "Detach (Preview)",
"title.attachDatabase": "Attach (Preview)"
}
3 changes: 3 additions & 0 deletions extensions/mssql/resources/folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions extensions/mssql/src/connection/commands.ts
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);
}
33 changes: 33 additions & 0 deletions extensions/mssql/src/connection/connectionService.ts
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, {});
}
}
6 changes: 6 additions & 0 deletions extensions/mssql/src/connection/constants.ts
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';
1 change: 1 addition & 0 deletions extensions/mssql/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const SqlAssessmentService = 'sqlAssessmentService';
export const NotebookConvertService = 'notebookConvertService';
export const AzureBlobService = 'azureBlobService';
export const ObjectManagementService = 'objectManagementService';
export const QueryStoreService = 'queryStoreService';

// CONFIGURATION VALUES //////////////////////////////////////////////////////////
export const configObjectExplorerGroupBySchemaFlagName = 'mssql.objectExplorer.groupBySchema';
Expand Down
Loading