code: public DocumentOperationResults performOnEachDocument( BiFunction<String, EditableDocument, Boolean> operation ) {
          DocumentOperationResults results = new DocumentOperationResults();
          database.keys().forEach(key -> 
              runInTransaction(() -> {
                  // We operate upon each document within a transaction ...
                  try {
                      EditableDocument doc = edit(key, false);
                      if (doc != null) {
                          if (operation.apply(key, doc)) {
                              results.recordModified();
                          } else {
                              results.recordUnmodified();
                          }
                      }
                  } catch (Throwable t) {
                      results.recordFailure();
                  }
                  return null;
              }, 1, key));
          return results;
      }
docs: Perform the supplied operation on each stored document that is accessible within this process. Each document will be
  operated upon in a separate transaction, which will be committed if the operation is successful or rolledback if the
  operation cannot be complete successfully.
  <p>
  Generally, this method executes the operation upon all documents. If there is an error processing a single document, that
  document is skipped and the execution will continue with the next document(s). However, if there is an exception with the
  transactions or another system failure, this method will terminate with an exception.
  
  @param operation the operation to be performed
  @return the summary of the number of documents that were affected