mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 11:26:00 +00:00
perspective loader class
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { PerspectiveDataLoader } from './PerspectiveDataLoader';
|
||||
import { PerspectiveDataLoadProps } from './PerspectiveTreeNode';
|
||||
|
||||
export interface PerspectiveDataCache {}
|
||||
@@ -6,9 +7,12 @@ export class PerspectiveDataProvider {
|
||||
constructor(
|
||||
public cache: PerspectiveDataCache,
|
||||
public setCache: (value: PerspectiveDataCache) => void,
|
||||
public loader: (props: PerspectiveDataLoadProps) => Promise<any[]>
|
||||
public loader: PerspectiveDataLoader
|
||||
) {}
|
||||
async loadData(props: PerspectiveDataLoadProps) {
|
||||
return await this.loader(props);
|
||||
async loadData(props: PerspectiveDataLoadProps): Promise<{ rows: any[]; incomplete: boolean }> {
|
||||
return {
|
||||
rows: await this.loader.loadData(props),
|
||||
incomplete: true,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user