dist/packages/partitioning-adapter/lokidb.partitioning-adapter.js
/**
     * Used to sequentially load each collection partition, one at a time.
     *
     * @param {int} partition - ordinal collection position to load next
     * @returns {Promise} a Promise that resolves after the next partition is loaded
     */
Used to sequentially load each collection partition, one at a time.
@param {int} partition - ordinal collection position to load next
@returns {Promise} a Promise that resolves after the next partition is loaded
Used to sequentially load each collection partition one at a time . @param { int } partition - ordinal collection position to load next @returns { Promise } a Promise that resolves after the next partition is loaded
_loadNextPartition(partition) {
        if (this._paging === true) {
            this._pageIterator.pageIndex = 0;
            return this._loadNextPage();
        }
        const keyname = this._dbname + "." + partition;
        return this._adapter.loadDatabase(keyname).then((result) => {
            this._dbref._collections[partition]._data = this._dbref.deserializeCollection(result, {
                delimited: true
            });
            if (++partition < this._dbref._collections.length) {
                return this._loadNextPartition(partition);
            }
            return Promise.resolve();
        });
    }
_loadNextPartition ( partition ) { if ( this . _paging === true ) { this . _pageIterator . pageIndex = 0 ; return this . _loadNextPage ( ) ; } const keyname = this . _dbname + "." + partition ; return this . _adapter . loadDatabase ( keyname ) . then ( ( result ) => { this . _dbref . _collections [ partition ] . _data = this . _dbref . deserializeCollection ( result , { delimited : true } ) ; if ( ++ partition < this . _dbref . _collections . length ) { return this . _loadNextPartition ( partition ) ; } return Promise . resolve ( ) ; } ) ; }
Used to sequentially load each collection partition, one at a time.
Used to sequentially load each collection partition one at a time .