Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,16 @@ public final void close() {
*/
public abstract boolean commit();

/**
* Revert a record key back x revisions.
*
* @param changes Number of revisions to revert.
* @param key The target key.
* @param record The specified target record.
* @return {@code true} if undo invoked successfully.
*/
public abstract void undo(long changes, String key, long record);

/**
* Return all of the keys in the database.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,14 @@ public boolean commit() {
});
}

@Override
public void undo(long changes, String key, long record) {
execute(() -> {
core.undo(changes, key, record, creds, transaction, environment);
return null;
});
}

@Override
public Set<String> describe() {
return execute(() -> {
Expand Down
Loading