public <R> R readResult(final KeyRange<ByteBuffer> keyRange,
                                final Function<Iterator<KeyVal<ByteBuffer>>, R> iteratorConsumer) {
            return db.iterateResult(readTxn, keyRange, iteratorConsumer);
        }
Write data from the data store to an output removing them from the datastore as we go as they will be transferred
to another store.

@param output The output to write to.
stroom-query/stroom-query-common/src/main/java/stroom/query/common/v2/LmdbDataStore.java