mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 18:26:00 +00:00
perspectives: added data provider layer
This commit is contained in:
14
packages/datalib/src/PerspectiveDataProvider.ts
Normal file
14
packages/datalib/src/PerspectiveDataProvider.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { PerspectiveDataLoadProps } from './PerspectiveTreeNode';
|
||||
|
||||
export interface PerspectiveDataCache {}
|
||||
|
||||
export class PerspectiveDataProvider {
|
||||
constructor(
|
||||
public cache: PerspectiveDataCache,
|
||||
public setCache: (value: PerspectiveDataCache) => void,
|
||||
public loader: (props: PerspectiveDataLoadProps) => Promise<any[]>
|
||||
) {}
|
||||
async loadData(props: PerspectiveDataLoadProps) {
|
||||
return await this.loader(props);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user