How to use the @hpcc-js/dgrid-shim.Deferred function in @hpcc-js/dgrid-shim

To help you get started, we’ve selected a few @hpcc-js/dgrid-shim examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hpcc-systems / Visualization / packages / dgrid / src / DBStore.ts View on Github external
fetchRange(opts: { start: number, end: number }): Promise {
        const data = this._fetchRange(opts);
        const retVal: any = new Deferred();
        retVal.totalLength = new Deferred();
        retVal.resolve(data);
        retVal.totalLength.resolve(this._db.length() - 1);
        return retVal;
    }
github hpcc-systems / Visualization / packages / dgrid / src / DBStore.ts View on Github external
fetchRange(opts: { start: number, end: number }): Promise {
        const data = this._fetchRange(opts);
        const retVal: any = new Deferred();
        retVal.totalLength = new Deferred();
        retVal.resolve(data);
        retVal.totalLength.resolve(this._db.length() - 1);
        return retVal;
    }
github hpcc-systems / Visualization / packages / dgrid / src / DatasourceStore.ts View on Github external
fetchRange(options): Promise {
        const retVal = new Deferred();
        this._request(options.start, options.end).then(response => retVal.resolve(response));
        return new QueryResults(retVal.then(response => response.data), {
            totalLength: retVal.then(response => response.totalLength)
        });
    }
}

@hpcc-js/dgrid-shim

dgrid shim

Apache-2.0
Latest version published 1 month ago

Package Health Score

75 / 100
Full package analysis