Skip to content

Commit

Permalink
feat: Support Baseline view
Browse files Browse the repository at this point in the history
Refs: #305
  • Loading branch information
grigoriev committed Dec 9, 2024
1 parent 4d66554 commit 233781b
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ private boolean sameDocument(@Nullable String projectId, @NotNull String spaceId
}

@SneakyThrows
public <T> T executeInBaseline(@Nullable String baselineRevision, @NotNull ReadOnlyTransaction transaction, Callable<T> callable) {
public <T> T executeInBaseline(@Nullable String baselineRevision, @NotNull ReadOnlyTransaction transaction, @NotNull Callable<T> callable) {
if (baselineRevision == null) {
return callable.call();
} else {
Expand All @@ -221,4 +221,12 @@ public <T> T executeInBaseline(@Nullable String baselineRevision, @NotNull ReadO
}
}

@SneakyThrows
public <T> T executeInBaseline(@Nullable String baselineRevision, @NotNull ReadOnlyTransaction transaction, @NotNull Runnable runnable) {
return executeInBaseline(baselineRevision, transaction, () -> {
runnable.run();
return null;
});
}

}

0 comments on commit 233781b

Please sign in to comment.