Skip to content

Commit 59bae53

Browse files
Merge pull request #101 from microsoft/lewissanchez/copy-results-to-clipboard
Revert copy clipboard changes from PR #93
2 parents e9ce224 + 66651ca commit 59bae53

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

src/azdata.proposed.d.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -887,13 +887,6 @@ declare module 'azdata' {
887887
selections: SelectionRange[];
888888
}
889889

890-
export interface CopyResultsRequestResult {
891-
/**
892-
* Result string from copy operation
893-
*/
894-
results: string;
895-
}
896-
897890
export interface QueryProvider {
898891
/**
899892
* Notify clients that the URI for a connection has been changed.
@@ -905,7 +898,7 @@ declare module 'azdata' {
905898
* ADS will use this if 'supportCopyResultsToClipboard' property is set to true in the provider contribution point in extension's package.json.
906899
* Otherwise, The default handler will load all the selected data to ADS and perform the copy operation.
907900
*/
908-
copyResults?(requestParams: CopyResultsRequestParams): Thenable<CopyResultsRequestResult>;
901+
copyResults?(requestParams: CopyResultsRequestParams): Thenable<void>;
909902
}
910903

911904
export enum DataProviderType {

src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,9 +587,9 @@ export class QueryFeature extends SqlOpsFeature<undefined> {
587587
);
588588
};
589589

590-
let copyResults = (params: azdata.CopyResultsRequestParams): Thenable<azdata.CopyResultsRequestResult> => {
590+
let copyResults = (params: azdata.CopyResultsRequestParams): Thenable<void> => {
591591
return client.sendRequest(protocol.CopyResultsRequest.type, params).then(
592-
r => r,
592+
r => undefined,
593593
e => {
594594
client.logFailedRequest(protocol.CopyResultsRequest.type, e);
595595
return Promise.reject(e);

src/protocol.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ export namespace SaveResultsAsXmlRequest {
469469
// --------------------------------- < Copy Results Request > ------------------------------------------
470470
// copy results to clipboard
471471
export namespace CopyResultsRequest {
472-
export const type = new RequestType<azdata.CopyResultsRequestParams, azdata.CopyResultsRequestResult, void, void>('query/copy');
472+
export const type = new RequestType<azdata.CopyResultsRequestParams, void, void, void>('query/copy');
473473
}
474474
// --------------------------------- </ Copy Results Request > ------------------------------------------
475475

0 commit comments

Comments
 (0)