Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce new session instantiation methods #1326

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

injectives
Copy link
Contributor

These new methods provide a consistent API for creating different types of session APIs.

Sample usage:

var synchronousSession = driver.session(Session.class);
var asynchronousSession = driver.session(AsyncSession.class);
var reactiveSession1 = driver.session(org.neo4j.driver.reactive.ReactiveSession.class);
var reactiveSession2 = driver.session(org.neo4j.driver.reactivestreams.ReactiveSession.class);
var reactiveSession3 = driver.session(org.neo4j.driver.reactive.RxSession.class);

The following methods have been deprecated:

  • asyncSession
  • reactiveSession

These new methods provide a consistent API for creating different types of session APIs.

Sample usage:
```
var synchronousSession = driver.session(Session.class);
var asynchronousSession = driver.session(AsyncSession.class);
var reactiveSession1 = driver.session(org.neo4j.driver.reactive.ReactiveSession.class);
var reactiveSession2 = driver.session(org.neo4j.driver.reactivestreams.ReactiveSession.class);
var reactiveSession3 = driver.session(org.neo4j.driver.reactive.RxSession.class);
```

The following methods have been deprecated:
- `asyncSession`
- `reactiveSession`
Copy link
Contributor

@michael-simons michael-simons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceptional great, haven’t look at the implementation. I think it reduces the spread out surface a lot without sacrificing functionality.

@injectives injectives merged commit 38dd9c0 into neo4j:5.0 Oct 27, 2022
@injectives injectives deleted the feature/session-methods branch October 27, 2022 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants