Skip to content

Commit

Permalink
Rename Driver.queryBookmarkManager() to Driver.queryTaskBookmarkManag…
Browse files Browse the repository at this point in the history
…er() (#1373)
  • Loading branch information
injectives authored Feb 7, 2023
1 parent 1c9a650 commit 4633115
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions driver/clirr-ignored-differences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -421,4 +421,10 @@
<method>org.neo4j.driver.BookmarkManager queryBookmarkManager()</method>
</difference>

<difference>
<className>org/neo4j/driver/Driver</className>
<differenceType>7012</differenceType>
<method>org.neo4j.driver.BookmarkManager queryTaskBookmarkManager()</method>
</difference>

</differences>
4 changes: 2 additions & 2 deletions driver/src/main/java/org/neo4j/driver/Driver.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ public interface Driver extends AutoCloseable {
* Returns an instance of {@link BookmarkManager} used by {@link QueryTask} instances by default.
*
* @return bookmark manager, must not be {@code null}
* @since 5.5
* @since 5.6
*/
@Experimental
BookmarkManager queryBookmarkManager();
BookmarkManager queryTaskBookmarkManager();

/**
* Return a flag to indicate whether or not encryption is used for this driver.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public QueryTask queryTask(String query) {
}

@Override
public BookmarkManager queryBookmarkManager() {
public BookmarkManager queryTaskBookmarkManager() {
return queryBookmarkManager;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public <A, R, T> T execute(Collector<Record, A, R> recordCollector, ResultFinish
var sessionConfigBuilder = SessionConfig.builder();
config.database().ifPresent(sessionConfigBuilder::withDatabase);
config.impersonatedUser().ifPresent(sessionConfigBuilder::withImpersonatedUser);
config.bookmarkManager(driver.queryBookmarkManager()).ifPresent(sessionConfigBuilder::withBookmarkManager);
config.bookmarkManager(driver.queryTaskBookmarkManager()).ifPresent(sessionConfigBuilder::withBookmarkManager);
var supplier = recordCollector.supplier();
var accumulator = recordCollector.accumulator();
var finisher = recordCollector.finisher();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void shouldExecuteAndReturnResult(RoutingControl routingControl) {
// GIVEN
var driver = mock(Driver.class);
var bookmarkManager = mock(BookmarkManager.class);
given(driver.queryBookmarkManager()).willReturn(bookmarkManager);
given(driver.queryTaskBookmarkManager()).willReturn(bookmarkManager);
var session = mock(Session.class);
given(driver.session(any(SessionConfig.class))).willReturn(session);
var txContext = mock(TransactionContext.class);
Expand Down

0 comments on commit 4633115

Please sign in to comment.