mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-27 17:23:21 -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:
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
/**
|
||||
* 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 {
|
||||
|
||||
Reference in New Issue
Block a user