From 4fe1077f7adcb03436a313ea6d37fa39af513ac1 Mon Sep 17 00:00:00 2001 From: Lewis Sanchez Date: Wed, 21 Aug 2024 16:14:09 -0700 Subject: [PATCH 01/11] Conditionally copy query results in backend --- src/sql/azdata.proposed.d.ts | 4 ++++ .../services/query/common/queryRunner.ts | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/sql/azdata.proposed.d.ts b/src/sql/azdata.proposed.d.ts index acac6b5f8dd8..4c8c54d39617 100644 --- a/src/sql/azdata.proposed.d.ts +++ b/src/sql/azdata.proposed.d.ts @@ -892,6 +892,10 @@ declare module 'azdata' { * The selected ranges to be copied. */ selections: SelectionRange[]; + /** + * Whether to copy the results directly from the backend. + */ + copyInBackend: boolean; } export interface CopyResultsRequestResult { diff --git a/src/sql/workbench/services/query/common/queryRunner.ts b/src/sql/workbench/services/query/common/queryRunner.ts index fb4e046c6980..15e7e85deae3 100644 --- a/src/sql/workbench/services/query/common/queryRunner.ts +++ b/src/sql/workbench/services/query/common/queryRunner.ts @@ -32,6 +32,7 @@ import { ITextResourcePropertiesService } from 'vs/editor/common/services/textRe import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService'; import { CancellationToken } from 'vs/base/common/cancellation'; import { ServerConnID } from 'sql/workbench/services/query/common/query'; +import { getRemoteAuthority, getRemoteName } from 'vs/platform/remote/common/remoteHosts'; /* * Query Runner class which handles running a query, reports the results to the content manager, @@ -495,11 +496,19 @@ export default class QueryRunner extends Disposable { * @param includeHeaders [Optional]: Should column headers be included in the copy selection */ async copyResults(selections: Slick.Range[], batchId: number, resultId: number, includeHeaders?: boolean): Promise { + let copyInBackend = false; + const remoteAuthority = getRemoteAuthority(URI.parse(this.uri)); + const remoteName = getRemoteName(remoteAuthority); + if (!remoteName) { + copyInBackend = true; + } + return this.queryManagementService.copyResults({ ownerUri: this.uri, batchIndex: batchId, resultSetIndex: resultId, includeHeaders: includeHeaders, + copyInBackend: copyInBackend, selections: selections.map(selection => { return { fromRow: selection.fromRow, @@ -618,10 +627,12 @@ export class QueryGridDataProvider implements IGridDataProvider { private async handleCopyRequestByProvider(selections: Slick.Range[], includeHeaders?: boolean): Promise { executeCopyWithNotification(this._notificationService, this._configurationService, selections, async () => { let results = await this.queryRunner.copyResults(selections, this.batchId, this.resultSetId, this.shouldIncludeHeaders(includeHeaders)); - let clipboardData: ClipboardData = { - text: results.results + if (results.results) { + let clipboardData: ClipboardData = { + text: results.results + } + this._clipboardService.write(clipboardData); } - this._clipboardService.write(clipboardData); }); } From 9aaaa5bd64685c85eac8b6b3ffaec4bc7c20c1f3 Mon Sep 17 00:00:00 2001 From: Lewis Sanchez Date: Mon, 26 Aug 2024 17:13:24 -0700 Subject: [PATCH 02/11] Remote dep on remote hosts --- src/sql/azdata.proposed.d.ts | 4 ++-- src/sql/workbench/services/query/common/queryRunner.ts | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/sql/azdata.proposed.d.ts b/src/sql/azdata.proposed.d.ts index 4c8c54d39617..8863b9c4d23a 100644 --- a/src/sql/azdata.proposed.d.ts +++ b/src/sql/azdata.proposed.d.ts @@ -893,9 +893,9 @@ declare module 'azdata' { */ selections: SelectionRange[]; /** - * Whether to copy the results directly from the backend. + * Whether to copy results from the UI process. */ - copyInBackend: boolean; + copyFromUIProcess?: boolean; } export interface CopyResultsRequestResult { diff --git a/src/sql/workbench/services/query/common/queryRunner.ts b/src/sql/workbench/services/query/common/queryRunner.ts index 15e7e85deae3..0759effe8739 100644 --- a/src/sql/workbench/services/query/common/queryRunner.ts +++ b/src/sql/workbench/services/query/common/queryRunner.ts @@ -32,7 +32,6 @@ import { ITextResourcePropertiesService } from 'vs/editor/common/services/textRe import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService'; import { CancellationToken } from 'vs/base/common/cancellation'; import { ServerConnID } from 'sql/workbench/services/query/common/query'; -import { getRemoteAuthority, getRemoteName } from 'vs/platform/remote/common/remoteHosts'; /* * Query Runner class which handles running a query, reports the results to the content manager, @@ -496,19 +495,11 @@ export default class QueryRunner extends Disposable { * @param includeHeaders [Optional]: Should column headers be included in the copy selection */ async copyResults(selections: Slick.Range[], batchId: number, resultId: number, includeHeaders?: boolean): Promise { - let copyInBackend = false; - const remoteAuthority = getRemoteAuthority(URI.parse(this.uri)); - const remoteName = getRemoteName(remoteAuthority); - if (!remoteName) { - copyInBackend = true; - } - return this.queryManagementService.copyResults({ ownerUri: this.uri, batchIndex: batchId, resultSetIndex: resultId, includeHeaders: includeHeaders, - copyInBackend: copyInBackend, selections: selections.map(selection => { return { fromRow: selection.fromRow, From f4534695939f096ad267b5799539f1386d688828 Mon Sep 17 00:00:00 2001 From: Lewis Sanchez Date: Wed, 28 Aug 2024 10:16:54 -0700 Subject: [PATCH 03/11] Remove changes --- src/sql/azdata.proposed.d.ts | 4 ---- src/sql/workbench/services/query/common/queryRunner.ts | 8 +++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/sql/azdata.proposed.d.ts b/src/sql/azdata.proposed.d.ts index 8863b9c4d23a..acac6b5f8dd8 100644 --- a/src/sql/azdata.proposed.d.ts +++ b/src/sql/azdata.proposed.d.ts @@ -892,10 +892,6 @@ declare module 'azdata' { * The selected ranges to be copied. */ selections: SelectionRange[]; - /** - * Whether to copy results from the UI process. - */ - copyFromUIProcess?: boolean; } export interface CopyResultsRequestResult { diff --git a/src/sql/workbench/services/query/common/queryRunner.ts b/src/sql/workbench/services/query/common/queryRunner.ts index 0759effe8739..fb4e046c6980 100644 --- a/src/sql/workbench/services/query/common/queryRunner.ts +++ b/src/sql/workbench/services/query/common/queryRunner.ts @@ -618,12 +618,10 @@ export class QueryGridDataProvider implements IGridDataProvider { private async handleCopyRequestByProvider(selections: Slick.Range[], includeHeaders?: boolean): Promise { executeCopyWithNotification(this._notificationService, this._configurationService, selections, async () => { let results = await this.queryRunner.copyResults(selections, this.batchId, this.resultSetId, this.shouldIncludeHeaders(includeHeaders)); - if (results.results) { - let clipboardData: ClipboardData = { - text: results.results - } - this._clipboardService.write(clipboardData); + let clipboardData: ClipboardData = { + text: results.results } + this._clipboardService.write(clipboardData); }); } From 2fbca7c3da6d4e8f0e3bdb49a3fc7e7bc8fc71ec Mon Sep 17 00:00:00 2001 From: Lewis Sanchez Date: Wed, 28 Aug 2024 10:43:37 -0700 Subject: [PATCH 04/11] Remove changes that caused slowdown --- extensions/import/src/test/utils.test.ts | 2 +- src/sql/azdata.proposed.d.ts | 9 +-------- .../workbench/api/browser/mainThreadDataProtocol.ts | 2 +- src/sql/workbench/api/common/extHostDataProtocol.ts | 2 +- src/sql/workbench/api/common/sqlExtHost.protocol.ts | 2 +- .../services/query/common/queryManagement.ts | 6 +++--- .../services/query/common/queryModelService.ts | 8 +------- .../workbench/services/query/common/queryRunner.ts | 12 ++++-------- .../query/test/common/testQueryManagementService.ts | 2 +- 9 files changed, 14 insertions(+), 31 deletions(-) diff --git a/extensions/import/src/test/utils.test.ts b/extensions/import/src/test/utils.test.ts index b940c479be92..4179fd17b18f 100644 --- a/extensions/import/src/test/utils.test.ts +++ b/extensions/import/src/test/utils.test.ts @@ -78,7 +78,7 @@ export class TestQueryProvider implements azdata.QueryProvider { saveResults(requestParams: azdata.SaveResultsRequestParams): Thenable { throw new Error('Method not implemented.'); } - copyResults(requestParams: azdata.CopyResultsRequestParams): Thenable { + copyResults(requestParams: azdata.CopyResultsRequestParams): Thenable { throw new Error('Method not implemented.'); } setQueryExecutionOptions(ownerUri: string, options: azdata.QueryExecutionOptions): Thenable { diff --git a/src/sql/azdata.proposed.d.ts b/src/sql/azdata.proposed.d.ts index acac6b5f8dd8..129d2577467a 100644 --- a/src/sql/azdata.proposed.d.ts +++ b/src/sql/azdata.proposed.d.ts @@ -894,13 +894,6 @@ declare module 'azdata' { selections: SelectionRange[]; } - export interface CopyResultsRequestResult { - /** - * Result string from copy operation - */ - results: string; - } - export interface QueryProvider { /** * Notify clients that the URI for a connection has been changed. @@ -912,7 +905,7 @@ declare module 'azdata' { * ADS will use this if 'supportCopyResultsToClipboard' property is set to true in the provider contribution point in extension's package.json. * Otherwise, The default handler will load all the selected data to ADS and perform the copy operation. */ - copyResults?(requestParams: CopyResultsRequestParams): Thenable; + copyResults?(requestParams: CopyResultsRequestParams): Thenable; } export enum DataProviderType { diff --git a/src/sql/workbench/api/browser/mainThreadDataProtocol.ts b/src/sql/workbench/api/browser/mainThreadDataProtocol.ts index e39384c463c1..40abdce2dc48 100644 --- a/src/sql/workbench/api/browser/mainThreadDataProtocol.ts +++ b/src/sql/workbench/api/browser/mainThreadDataProtocol.ts @@ -161,7 +161,7 @@ export class MainThreadDataProtocol extends Disposable implements MainThreadData return Promise.resolve(self._serializationService.saveAs(requestParams.resultFormat, requestParams.filePath, undefined, true)); } }, - copyResults(requestParams: azdata.CopyResultsRequestParams): Promise { + copyResults(requestParams: azdata.CopyResultsRequestParams): Promise { return Promise.resolve(self._proxy.$copyResults(handle, requestParams)); }, initializeEdit(ownerUri: string, schemaName: string, objectName: string, objectType: string, rowLimit: number, queryString: string): Promise { diff --git a/src/sql/workbench/api/common/extHostDataProtocol.ts b/src/sql/workbench/api/common/extHostDataProtocol.ts index 4fbdbf45e39f..060b8008ff11 100644 --- a/src/sql/workbench/api/common/extHostDataProtocol.ts +++ b/src/sql/workbench/api/common/extHostDataProtocol.ts @@ -420,7 +420,7 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape { return this._resolveProvider(handle).saveResults(requestParams); } - override $copyResults(handle: number, requestParams: azdata.CopyResultsRequestParams): Thenable { + override $copyResults(handle: number, requestParams: azdata.CopyResultsRequestParams): Thenable { const provider = this._resolveProvider(handle); if (provider.copyResults) { return provider.copyResults(requestParams); diff --git a/src/sql/workbench/api/common/sqlExtHost.protocol.ts b/src/sql/workbench/api/common/sqlExtHost.protocol.ts index bbdd3a1795cb..0d69395668aa 100644 --- a/src/sql/workbench/api/common/sqlExtHost.protocol.ts +++ b/src/sql/workbench/api/common/sqlExtHost.protocol.ts @@ -254,7 +254,7 @@ export abstract class ExtHostDataProtocolShape { /** * Copies the selected data to clipboard. */ - $copyResults(handle: number, requestParams: azdata.CopyResultsRequestParams): Thenable { throw ni(); } + $copyResults(handle: number, requestParams: azdata.CopyResultsRequestParams): Thenable { throw ni(); } /** * Commits all pending edits in an edit session diff --git a/src/sql/workbench/services/query/common/queryManagement.ts b/src/sql/workbench/services/query/common/queryManagement.ts index cfb5f1177fff..241b43d8529b 100644 --- a/src/sql/workbench/services/query/common/queryManagement.ts +++ b/src/sql/workbench/services/query/common/queryManagement.ts @@ -69,7 +69,7 @@ export interface IQueryManagementService { changeConnectionUri(newUri: string, oldUri: string): Promise; saveResults(requestParams: azdata.SaveResultsRequestParams): Promise; setQueryExecutionOptions(uri: string, options: azdata.QueryExecutionOptions): Promise; - copyResults(params: azdata.CopyResultsRequestParams): Promise; + copyResults(params: azdata.CopyResultsRequestParams): Promise; // Callbacks onQueryComplete(result: azdata.QueryExecuteCompleteNotificationResult): void; @@ -108,7 +108,7 @@ export interface IQueryRequestHandler { disposeQuery(ownerUri: string): Promise; connectionUriChanged(newUri: string, oldUri: string): Promise; saveResults(requestParams: azdata.SaveResultsRequestParams): Promise; - copyResults(requestParams: azdata.CopyResultsRequestParams): Promise; + copyResults(requestParams: azdata.CopyResultsRequestParams): Promise; setQueryExecutionOptions(ownerUri: string, options: azdata.QueryExecutionOptions): Promise; // Edit Data actions @@ -364,7 +364,7 @@ export class QueryManagementService implements IQueryManagementService { }); } - public copyResults(requestParams: azdata.CopyResultsRequestParams): Promise { + public copyResults(requestParams: azdata.CopyResultsRequestParams): Promise { return this._runAction(requestParams.ownerUri, (runner) => { return runner.copyResults(requestParams); }); diff --git a/src/sql/workbench/services/query/common/queryModelService.ts b/src/sql/workbench/services/query/common/queryModelService.ts index 2f7d84d2505c..7945c3f19c87 100644 --- a/src/sql/workbench/services/query/common/queryModelService.ts +++ b/src/sql/workbench/services/query/common/queryModelService.ts @@ -22,7 +22,6 @@ import Severity from 'vs/base/common/severity'; import EditQueryRunner from 'sql/workbench/services/editData/common/editQueryRunner'; import { IRange } from 'vs/editor/common/core/range'; import { ServerConnID } from 'sql/workbench/services/query/common/query'; -import { ClipboardData, IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IQueryManagementService } from 'sql/workbench/services/query/common/queryManagement'; const selectionSnippetMaxLen = 100; @@ -88,7 +87,6 @@ export class QueryModelService implements IQueryModelService { @IQueryManagementService protected queryManagementService: IQueryManagementService, @IInstantiationService private _instantiationService: IInstantiationService, @INotificationService private _notificationService: INotificationService, - @IClipboardService private _clipboardService: IClipboardService, @ILogService private _logService: ILogService ) { this._queryInfoMap = new Map(); @@ -178,11 +176,7 @@ export class QueryModelService implements IQueryModelService { public async copyResults(uri: string, selection: Slick.Range[], batchId: number, resultId: number, includeHeaders?: boolean): Promise { if (this._queryInfoMap.has(uri)) { - const results = await this._queryInfoMap.get(uri)!.queryRunner!.copyResults(selection, batchId, resultId, includeHeaders); - let clipboardData: ClipboardData = { - text: results.results - }; - this._clipboardService.write(clipboardData); + return this._queryInfoMap.get(uri)!.queryRunner!.copyResults(selection, batchId, resultId, includeHeaders); } } diff --git a/src/sql/workbench/services/query/common/queryRunner.ts b/src/sql/workbench/services/query/common/queryRunner.ts index fb4e046c6980..75c60091b0fe 100644 --- a/src/sql/workbench/services/query/common/queryRunner.ts +++ b/src/sql/workbench/services/query/common/queryRunner.ts @@ -11,7 +11,7 @@ import { ResultSerializer, SaveFormat } from 'sql/workbench/services/query/commo import * as azdata from 'azdata'; import * as nls from 'vs/nls'; -import { ClipboardData, IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; +import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import * as types from 'vs/base/common/types'; import { Disposable } from 'vs/base/common/lifecycle'; import { INotificationService } from 'vs/platform/notification/common/notification'; @@ -494,8 +494,8 @@ export default class QueryRunner extends Disposable { * @param resultId The result id of the result to copy from * @param includeHeaders [Optional]: Should column headers be included in the copy selection */ - async copyResults(selections: Slick.Range[], batchId: number, resultId: number, includeHeaders?: boolean): Promise { - return this.queryManagementService.copyResults({ + async copyResults(selections: Slick.Range[], batchId: number, resultId: number, includeHeaders?: boolean): Promise { + await this.queryManagementService.copyResults({ ownerUri: this.uri, batchIndex: batchId, resultSetIndex: resultId, @@ -617,11 +617,7 @@ export class QueryGridDataProvider implements IGridDataProvider { private async handleCopyRequestByProvider(selections: Slick.Range[], includeHeaders?: boolean): Promise { executeCopyWithNotification(this._notificationService, this._configurationService, selections, async () => { - let results = await this.queryRunner.copyResults(selections, this.batchId, this.resultSetId, this.shouldIncludeHeaders(includeHeaders)); - let clipboardData: ClipboardData = { - text: results.results - } - this._clipboardService.write(clipboardData); + await this.queryRunner.copyResults(selections, this.batchId, this.resultSetId, this.shouldIncludeHeaders(includeHeaders)); }); } diff --git a/src/sql/workbench/services/query/test/common/testQueryManagementService.ts b/src/sql/workbench/services/query/test/common/testQueryManagementService.ts index 20aa1f079db2..0da575694cdc 100644 --- a/src/sql/workbench/services/query/test/common/testQueryManagementService.ts +++ b/src/sql/workbench/services/query/test/common/testQueryManagementService.ts @@ -66,7 +66,7 @@ export class TestQueryManagementService implements IQueryManagementService { saveResults(requestParams: azdata.SaveResultsRequestParams): Promise { throw new Error('Method not implemented.'); } - copyResults(params: azdata.CopyResultsRequestParams): Promise { + copyResults(params: azdata.CopyResultsRequestParams): Promise { throw new Error('Method not implemented.'); } setQueryExecutionOptions(uri: string, options: azdata.QueryExecutionOptions): Promise { From 86d98492e89d70b7a400ac5d53c5c23eda7752c2 Mon Sep 17 00:00:00 2001 From: Lewis Sanchez Date: Wed, 28 Aug 2024 19:11:53 -0700 Subject: [PATCH 05/11] Prefer copying from UI process --- src/sql/workbench/contrib/query/browser/query.contribution.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sql/workbench/contrib/query/browser/query.contribution.ts b/src/sql/workbench/contrib/query/browser/query.contribution.ts index a39a3ad0fc7c..922416f62e97 100644 --- a/src/sql/workbench/contrib/query/browser/query.contribution.ts +++ b/src/sql/workbench/contrib/query/browser/query.contribution.ts @@ -335,8 +335,8 @@ const queryEditorConfiguration: IConfigurationNode = { }, 'queryEditor.results.preferProvidersCopyHandler': { 'type': 'boolean', - 'description': localize('queryEditor.results.preferProvidersCopyHandler', "Whether the copy result request should be handled by the query provider when it is supported. The default value is true, set this to false to force all copy handling to be done by Azure Data Studio."), - 'default': true + 'description': localize('queryEditor.results.preferProvidersCopyHandler', "Whether the copy result request should be handled by the query provider when it is supported. The default value is false, set this to true to force all copy handling to be done by the query provider."), + 'default': false }, 'queryEditor.results.inMemoryDataProcessingThreshold': { 'type': 'number', From 8d33982346a8e553a30adb64154dd57f9d1c803d Mon Sep 17 00:00:00 2001 From: Lewis Sanchez Date: Thu, 29 Aug 2024 17:46:02 -0700 Subject: [PATCH 06/11] Revert "Prefer copying from UI process" This reverts commit 86d98492e89d70b7a400ac5d53c5c23eda7752c2. --- src/sql/workbench/contrib/query/browser/query.contribution.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sql/workbench/contrib/query/browser/query.contribution.ts b/src/sql/workbench/contrib/query/browser/query.contribution.ts index 922416f62e97..a39a3ad0fc7c 100644 --- a/src/sql/workbench/contrib/query/browser/query.contribution.ts +++ b/src/sql/workbench/contrib/query/browser/query.contribution.ts @@ -335,8 +335,8 @@ const queryEditorConfiguration: IConfigurationNode = { }, 'queryEditor.results.preferProvidersCopyHandler': { 'type': 'boolean', - 'description': localize('queryEditor.results.preferProvidersCopyHandler', "Whether the copy result request should be handled by the query provider when it is supported. The default value is false, set this to true to force all copy handling to be done by the query provider."), - 'default': false + 'description': localize('queryEditor.results.preferProvidersCopyHandler', "Whether the copy result request should be handled by the query provider when it is supported. The default value is true, set this to false to force all copy handling to be done by Azure Data Studio."), + 'default': true }, 'queryEditor.results.inMemoryDataProcessingThreshold': { 'type': 'number', From 550d24e7e15d295982c6721495682077786da3bb Mon Sep 17 00:00:00 2001 From: Lewis Sanchez Date: Thu, 29 Aug 2024 19:22:29 -0700 Subject: [PATCH 07/11] Set prefer provider copy setting to false for linux --- src/sql/workbench/contrib/query/browser/query.contribution.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sql/workbench/contrib/query/browser/query.contribution.ts b/src/sql/workbench/contrib/query/browser/query.contribution.ts index a39a3ad0fc7c..b0dbecff81c8 100644 --- a/src/sql/workbench/contrib/query/browser/query.contribution.ts +++ b/src/sql/workbench/contrib/query/browser/query.contribution.ts @@ -335,8 +335,8 @@ const queryEditorConfiguration: IConfigurationNode = { }, 'queryEditor.results.preferProvidersCopyHandler': { 'type': 'boolean', - 'description': localize('queryEditor.results.preferProvidersCopyHandler', "Whether the copy result request should be handled by the query provider when it is supported. The default value is true, set this to false to force all copy handling to be done by Azure Data Studio."), - 'default': true + 'description': localize('queryEditor.results.preferProvidersCopyHandler', "Whether the copy result request should be handled by the query provider when it is supported. The default value is true, except for linux where the default value is false, set this to false to force all copy handling to be done by Azure Data Studio."), + 'default': process.platform !== 'linux' ? true : false, }, 'queryEditor.results.inMemoryDataProcessingThreshold': { 'type': 'number', From 177aff6884cfc77b739ae4495fb7f4c4ad152758 Mon Sep 17 00:00:00 2001 From: Lewis Sanchez Date: Thu, 29 Aug 2024 22:53:34 -0700 Subject: [PATCH 08/11] Revert "Set prefer provider copy setting to false for linux" This reverts commit 550d24e7e15d295982c6721495682077786da3bb. --- src/sql/workbench/contrib/query/browser/query.contribution.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sql/workbench/contrib/query/browser/query.contribution.ts b/src/sql/workbench/contrib/query/browser/query.contribution.ts index b0dbecff81c8..a39a3ad0fc7c 100644 --- a/src/sql/workbench/contrib/query/browser/query.contribution.ts +++ b/src/sql/workbench/contrib/query/browser/query.contribution.ts @@ -335,8 +335,8 @@ const queryEditorConfiguration: IConfigurationNode = { }, 'queryEditor.results.preferProvidersCopyHandler': { 'type': 'boolean', - 'description': localize('queryEditor.results.preferProvidersCopyHandler', "Whether the copy result request should be handled by the query provider when it is supported. The default value is true, except for linux where the default value is false, set this to false to force all copy handling to be done by Azure Data Studio."), - 'default': process.platform !== 'linux' ? true : false, + 'description': localize('queryEditor.results.preferProvidersCopyHandler', "Whether the copy result request should be handled by the query provider when it is supported. The default value is true, set this to false to force all copy handling to be done by Azure Data Studio."), + 'default': true }, 'queryEditor.results.inMemoryDataProcessingThreshold': { 'type': 'number', From 34df6d71c2194e2f373fcc178c2ebebb6471383a Mon Sep 17 00:00:00 2001 From: Lewis Sanchez Date: Thu, 5 Sep 2024 16:38:13 -0700 Subject: [PATCH 09/11] Default copy handling to UI for Linux --- .../workbench/contrib/query/browser/query.contribution.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sql/workbench/contrib/query/browser/query.contribution.ts b/src/sql/workbench/contrib/query/browser/query.contribution.ts index a39a3ad0fc7c..684dff2e1d3a 100644 --- a/src/sql/workbench/contrib/query/browser/query.contribution.ts +++ b/src/sql/workbench/contrib/query/browser/query.contribution.ts @@ -9,6 +9,7 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IConfigurationRegistry, Extensions as ConfigExtensions, IConfigurationNode } from 'vs/platform/configuration/common/configurationRegistry'; import { MenuId, MenuRegistry, registerAction2 } from 'vs/platform/actions/common/actions'; import { KeyMod, KeyCode, KeyChord } from 'vs/base/common/keyCodes'; +import * as platform from 'vs/base/common/platform'; import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { ContextKeyExpr, ContextKeyEqualsExpr } from 'vs/platform/contextkey/common/contextkey'; @@ -335,8 +336,8 @@ const queryEditorConfiguration: IConfigurationNode = { }, 'queryEditor.results.preferProvidersCopyHandler': { 'type': 'boolean', - 'description': localize('queryEditor.results.preferProvidersCopyHandler', "Whether the copy result request should be handled by the query provider when it is supported. The default value is true, set this to false to force all copy handling to be done by Azure Data Studio."), - 'default': true + 'description': localize('queryEditor.results.preferProvidersCopyHandler', "Whether the copy result request should be handled by the query provider when it is supported. The default value is true for Windows and Mac, and false for Linux, set this to false to force all copy handling to be done by Azure Data Studio."), + 'default': platform.isLinux ? false : true }, 'queryEditor.results.inMemoryDataProcessingThreshold': { 'type': 'number', From 7a6b98da4c20a6092f7bbcc1a3e0a77fc41a8044 Mon Sep 17 00:00:00 2001 From: Lewis Sanchez Date: Thu, 12 Sep 2024 14:38:01 -0700 Subject: [PATCH 10/11] Bump SqlOps-DataProtocolClient package to 2.0.1 --- extensions/azuremonitor/package.json | 2 +- extensions/azuremonitor/yarn.lock | 6 +++--- extensions/datavirtualization/package.json | 2 +- extensions/datavirtualization/yarn.lock | 6 +++--- extensions/import/package.json | 2 +- extensions/import/yarn.lock | 6 +++--- extensions/kusto/package.json | 2 +- extensions/kusto/yarn.lock | 6 +++--- extensions/mssql/package.json | 2 +- extensions/mssql/yarn.lock | 6 +++--- extensions/sql-migration/package.json | 2 +- extensions/sql-migration/yarn.lock | 6 +++--- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/extensions/azuremonitor/package.json b/extensions/azuremonitor/package.json index e1ce0d9e5e6a..8fccd909984d 100644 --- a/extensions/azuremonitor/package.json +++ b/extensions/azuremonitor/package.json @@ -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#2.0.0", + "dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.1", "figures": "^2.0.0", "find-remove": "1.2.1", "@microsoft/ads-service-downloader": "^1.2.1", diff --git a/extensions/azuremonitor/yarn.lock b/extensions/azuremonitor/yarn.lock index 3379fffc6f36..8131efa64d5e 100644 --- a/extensions/azuremonitor/yarn.lock +++ b/extensions/azuremonitor/yarn.lock @@ -75,9 +75,9 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.0": - version "2.0.0" - resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/39d7544771a4f44e707d0a38eb2fda1f08793d08" +"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.1": + version "2.0.1" + resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/7e8dff4aee7e674516367421a3e84fe9a1aa37b1" dependencies: vscode-languageclient "5.2.1" diff --git a/extensions/datavirtualization/package.json b/extensions/datavirtualization/package.json index 8b6c65a193e2..5346dbf19f3f 100644 --- a/extensions/datavirtualization/package.json +++ b/extensions/datavirtualization/package.json @@ -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#2.0.0", + "dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.1", "vscode-nls": "^5.2.0" }, "devDependencies": { diff --git a/extensions/datavirtualization/yarn.lock b/extensions/datavirtualization/yarn.lock index ea559862b7e8..447e26017a49 100644 --- a/extensions/datavirtualization/yarn.lock +++ b/extensions/datavirtualization/yarn.lock @@ -504,9 +504,9 @@ crypt@0.0.2: 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#2.0.0": - version "2.0.0" - resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/39d7544771a4f44e707d0a38eb2fda1f08793d08" +"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.1": + version "2.0.1" + resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/7e8dff4aee7e674516367421a3e84fe9a1aa37b1" dependencies: vscode-languageclient "5.2.1" diff --git a/extensions/import/package.json b/extensions/import/package.json index 4ab0b54e828d..e566318c8fbb 100644 --- a/extensions/import/package.json +++ b/extensions/import/package.json @@ -77,7 +77,7 @@ } }, "dependencies": { - "dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.0", + "dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.1", "htmlparser2": "^3.10.1", "@microsoft/ads-service-downloader": "^1.2.1", "@microsoft/ads-extension-telemetry": "^3.0.1", diff --git a/extensions/import/yarn.lock b/extensions/import/yarn.lock index 464ef1d865bb..886361e77b53 100644 --- a/extensions/import/yarn.lock +++ b/extensions/import/yarn.lock @@ -559,9 +559,9 @@ crypt@0.0.2: 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#2.0.0": - version "2.0.0" - resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/39d7544771a4f44e707d0a38eb2fda1f08793d08" +"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.1": + version "2.0.1" + resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/7e8dff4aee7e674516367421a3e84fe9a1aa37b1" dependencies: vscode-languageclient "5.2.1" diff --git a/extensions/kusto/package.json b/extensions/kusto/package.json index 13787282c692..fe2cdd913c6e 100644 --- a/extensions/kusto/package.json +++ b/extensions/kusto/package.json @@ -444,7 +444,7 @@ } }, "dependencies": { - "dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.0", + "dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.1", "figures": "^2.0.0", "find-remove": "1.2.1", "@microsoft/ads-service-downloader": "^1.2.1", diff --git a/extensions/kusto/yarn.lock b/extensions/kusto/yarn.lock index 97a3ce2df8c5..b36a8673b94d 100644 --- a/extensions/kusto/yarn.lock +++ b/extensions/kusto/yarn.lock @@ -124,9 +124,9 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.0": - version "2.0.0" - resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/39d7544771a4f44e707d0a38eb2fda1f08793d08" +"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.1": + version "2.0.1" + resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/7e8dff4aee7e674516367421a3e84fe9a1aa37b1" dependencies: vscode-languageclient "5.2.1" diff --git a/extensions/mssql/package.json b/extensions/mssql/package.json index f22c75d98ab4..d4c07c53b9e2 100644 --- a/extensions/mssql/package.json +++ b/extensions/mssql/package.json @@ -1712,7 +1712,7 @@ "@aws-sdk/client-s3": "^3.490.0", "@microsoft/ads-extension-telemetry": "^3.0.1", "@microsoft/ads-service-downloader": "^1.2.1", - "dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.0", + "dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.1", "find-remove": "1.2.1", "vscode-languageclient": "5.2.1", "vscode-nls": "^4.0.0" diff --git a/extensions/mssql/yarn.lock b/extensions/mssql/yarn.lock index b4a6749edffd..21e7e9e10849 100644 --- a/extensions/mssql/yarn.lock +++ b/extensions/mssql/yarn.lock @@ -1559,9 +1559,9 @@ crypt@0.0.2: 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#2.0.0": - version "2.0.0" - resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/39d7544771a4f44e707d0a38eb2fda1f08793d08" +"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.1": + version "2.0.1" + resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/7e8dff4aee7e674516367421a3e84fe9a1aa37b1" dependencies: vscode-languageclient "5.2.1" diff --git a/extensions/sql-migration/package.json b/extensions/sql-migration/package.json index 75cd8ba1ff3c..65597ea07d6d 100644 --- a/extensions/sql-migration/package.json +++ b/extensions/sql-migration/package.json @@ -174,7 +174,7 @@ ] }, "dependencies": { - "dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.0", + "dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.1", "@microsoft/ads-service-downloader": "^1.2.1", "@microsoft/ads-extension-telemetry": "^3.0.1", "uuid": "^8.3.2", diff --git a/extensions/sql-migration/yarn.lock b/extensions/sql-migration/yarn.lock index 8fb6e726a5a9..4ede03b200e2 100644 --- a/extensions/sql-migration/yarn.lock +++ b/extensions/sql-migration/yarn.lock @@ -195,9 +195,9 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== -"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.0": - version "2.0.0" - resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/39d7544771a4f44e707d0a38eb2fda1f08793d08" +"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.1": + version "2.0.1" + resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/7e8dff4aee7e674516367421a3e84fe9a1aa37b1" dependencies: vscode-languageclient "5.2.1" From c5bc7ae23f6a71b78569aa5aaa469cd9d357cb6d Mon Sep 17 00:00:00 2001 From: Lewis Sanchez Date: Thu, 12 Sep 2024 18:56:09 -0700 Subject: [PATCH 11/11] Bump STS Version to 5.0.20240912.2 --- extensions/mssql/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/mssql/config.json b/extensions/mssql/config.json index 1a02ff944fb1..44fcd3446152 100644 --- a/extensions/mssql/config.json +++ b/extensions/mssql/config.json @@ -1,6 +1,6 @@ { "downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/{#version#}/microsoft.sqltools.servicelayer-{#fileName#}", - "version": "5.0.20240724.1", + "version": "5.0.20240912.2", "downloadFileNames": { "Windows_86": "win-x86-net8.0.zip", "Windows_64": "win-x64-net8.0.zip",