mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
add copy results to query provider (#23357)
* add copy results to query provider * mark as optional * fix test stub * Update src/sql/azdata.proposed.d.ts Co-authored-by: Charles Gagnon <chgagnon@microsoft.com> * address comments * update return type --------- Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
@@ -78,6 +78,9 @@ export class TestQueryProvider implements azdata.QueryProvider {
|
|||||||
saveResults(requestParams: azdata.SaveResultsRequestParams): Thenable<azdata.SaveResultRequestResult> {
|
saveResults(requestParams: azdata.SaveResultsRequestParams): Thenable<azdata.SaveResultRequestResult> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
copyResults(requestParams: azdata.CopyResultsRequestParams): Thenable<void> {
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
setQueryExecutionOptions(ownerUri: string, options: azdata.QueryExecutionOptions): Thenable<void> {
|
setQueryExecutionOptions(ownerUri: string, options: azdata.QueryExecutionOptions): Thenable<void> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|||||||
49
src/sql/azdata.proposed.d.ts
vendored
49
src/sql/azdata.proposed.d.ts
vendored
@@ -823,11 +823,58 @@ declare module 'azdata' {
|
|||||||
parentTypeName?: string;
|
parentTypeName?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a selected range in the result grid.
|
||||||
|
*/
|
||||||
|
export interface SelectionRange {
|
||||||
|
fromRow: number;
|
||||||
|
toRow: number;
|
||||||
|
fromColumn: number;
|
||||||
|
toColumn: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameters for the copy results request.
|
||||||
|
*/
|
||||||
|
export interface CopyResultsRequestParams {
|
||||||
|
/**
|
||||||
|
* URI of the editor.
|
||||||
|
*/
|
||||||
|
ownerUri: string;
|
||||||
|
/**
|
||||||
|
* Index of the batch.
|
||||||
|
*/
|
||||||
|
batchIndex: number;
|
||||||
|
/**
|
||||||
|
* Index of the result set.
|
||||||
|
*/
|
||||||
|
resultSetIndex: number;
|
||||||
|
/**
|
||||||
|
* Whether to include the column headers.
|
||||||
|
*/
|
||||||
|
includeHeaders: boolean
|
||||||
|
/**
|
||||||
|
* Whether to remove line breaks from the cell value.
|
||||||
|
*/
|
||||||
|
removeNewLines: boolean;
|
||||||
|
/**
|
||||||
|
* The selected ranges to be copied.
|
||||||
|
*/
|
||||||
|
selections: SelectionRange[];
|
||||||
|
}
|
||||||
|
|
||||||
export interface QueryProvider {
|
export interface QueryProvider {
|
||||||
/**
|
/**
|
||||||
* Notify clients that the URI for a connection has been changed.
|
* Notify clients that the URI for a connection has been changed.
|
||||||
*/
|
*/
|
||||||
connectionUriChanged(newUri: string, oldUri: string): Thenable<void>;
|
connectionUriChanged?(newUri: string, oldUri: string): Thenable<void>;
|
||||||
|
/**
|
||||||
|
* Copy the selected data to the clipboard.
|
||||||
|
* This is introduced to address the performance issue of large amount of data to ADS side.
|
||||||
|
* 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<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum DataProviderType {
|
export enum DataProviderType {
|
||||||
|
|||||||
Reference in New Issue
Block a user