dist/packages/partitioning-adapter/lokidb.partitioning-adapter.js
/**
     * Saves a database by partioning into separate key/value saves.
     * (Loki 'reference mode' persistence adapter interface function)
     *
     * @param {string} dbname - name of the database (filename/keyname)
     * @param {object} dbref - reference to database which we will partition and save.
     * @returns {Promise} a Promise that resolves after the database was deleted
     *
     */
Saves a database by partioning into separate key/value saves.
(Loki 'reference mode' persistence adapter interface function)

@param {string} dbname - name of the database (filename/keyname)
@param {object} dbref - reference to database which we will partition and save.
@returns {Promise} a Promise that resolves after the database was deleted
Saves a database by partioning into separate key / value saves . ( Loki ' reference mode ' persistence adapter interface function ) @param { string } dbname - name of the database ( filename / keyname ) @param { object } dbref - reference to database which we will partition and save . @returns { Promise } a Promise that resolves after the database was deleted
exportDatabase(dbname, dbref) {
        this._dbref = dbref;
        this._dbname = dbname;
        this._dirtyPartitions = [-1];
        for (let idx = 0; idx < dbref._collections.length; idx++) {
            if (dbref._collections[idx]._dirty) {
                this._dirtyPartitions.push(idx);
            }
        }
        return this._saveNextPartition();
    }
exportDatabase ( dbname , dbref ) { this . _dbref = dbref ; this . _dbname = dbname ; this . _dirtyPartitions = [ - 1 ] ; for ( let idx = 0 ; idx < dbref . _collections . length ; idx ++ ) { if ( dbref . _collections [ idx ] . _dirty ) { this . _dirtyPartitions . push ( idx ) ; } } return this . _saveNextPartition ( ) ; }
Saves a database by partioning into separate key/value saves.
Saves a database by partioning into separate key / value saves .
// queue up dirty partitions to be saved