import { DDL2 } from "@hpcc-js/ddl-shim";
import { ColumnType } from "./RowFormatter";
export interface IDatasource {
    id: () => string;
    hash: () => string;
    label: () => string;
    outFields: () => DDL2.IField[];
    total: () => number;
    fetch: (from: number, count: number) => Promise<ReadonlyArray<object>>;
}
export declare class DatasourceCache implements IDatasource {
    protected _datasource: IDatasource;
    _prevHash: string;
    _fetchCache: {
        [key: string]: Promise<ReadonlyArray<object>>;
    };
    constructor(datasource: IDatasource);
    validateCache(): void;
    id(): string;
    hash(): string;
    label(): string;
    outFields(): DDL2.IField[];
    total(): number;
    fetch(from: number, count: number): Promise<ReadonlyArray<object>>;
}
export declare class DatasourceStore {
    _datasource: DatasourceCache;
    _columnsIdx: {
        [key: string]: number;
    };
    _columns: any;
    private rowFormatter;
    constructor(datasource: IDatasource, renderHtml: boolean);
    columns(): any;
    db2Columns(fields: DDL2.IField[], prefix?: string): ColumnType[];
    getIdentity(row: any): any;
    _request(start: any, end: any): Promise<{
        totalLength: number;
        data: any[];
    }>;
    fetchRange(options: any): Promise<any[]>;
}
//# sourceMappingURL=DatasourceStore.d.ts.map