mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 17:23:02 -05:00
query results filtering and sorting (#14833)
* query results filtering and sorting (#14589) * enable filter * attach button style * add hybrid data provider * make filter and sort work * fix editor switch issue * configuration * fix sort and filter * add more specific selector * fix hidden items issue * update text * revert text change * fix copy results issue * put feature behind preview flag * comments * fix tslint error
This commit is contained in:
61
src/sql/base/common/dataProvider.ts
Normal file
61
src/sql/base/common/dataProvider.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { Event } from 'vs/base/common/event';
|
||||
|
||||
/**
|
||||
* Interface for table data providers
|
||||
*/
|
||||
export interface IDisposableDataProvider<T> extends Slick.DataProvider<T> {
|
||||
/**
|
||||
* Disposes the data provider object
|
||||
*/
|
||||
dispose(): void;
|
||||
|
||||
/**
|
||||
* Gets the rows of the giving range
|
||||
* @param startIndex Start index of the range
|
||||
* @param length Length of the rows to retrieve
|
||||
*/
|
||||
getRangeAsync(startIndex: number, length: number): Promise<T[]>;
|
||||
|
||||
/**
|
||||
* Gets unique values of all the cells in the given column
|
||||
* @param column the column information
|
||||
*/
|
||||
getColumnValues(column: Slick.Column<T>): Promise<string[]>;
|
||||
|
||||
/**
|
||||
* Gets the unique values of the filtered cells in the given column
|
||||
* @param column
|
||||
*/
|
||||
getFilteredColumnValues(column: Slick.Column<T>): Promise<string[]>;
|
||||
|
||||
/**
|
||||
* Filters the data
|
||||
* @param columns columns to be filtered, the
|
||||
*/
|
||||
filter(columns?: Slick.Column<T>[]): Promise<void>;
|
||||
|
||||
/**
|
||||
* Sorts the data
|
||||
* @param args sort arguments
|
||||
*/
|
||||
sort(args: Slick.OnSortEventArgs<T>): Promise<void>;
|
||||
|
||||
/**
|
||||
* Event fired when the filters changed
|
||||
*/
|
||||
readonly onFilterStateChange: Event<void>;
|
||||
|
||||
/**
|
||||
* Event fired when the sorting is completed
|
||||
*/
|
||||
readonly onSortComplete: Event<Slick.OnSortEventArgs<T>>;
|
||||
|
||||
/**
|
||||
* Gets a boolean value indicating whether the data is current in memory
|
||||
*/
|
||||
readonly isDataInMemory: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user