Skip to content

Conversation

injectives
Copy link
Contributor

@injectives injectives commented Mar 23, 2022

This update introduces a new method to result handles for checking if result is open:

  • Result.isOpen()
  • ResultCursor.isOpenAsync()
  • RxResult.isOpen()

Result is considered to be open if it has not been consumed via the consume method and its creator object (e.g. session or transaction) has not been closed (including committed or rolled back).

Attempts to access data on closed result will produce {@link ResultConsumedException}.

Implementation is based on existing internal logic.

@injectives injectives marked this pull request as draft March 23, 2022 00:01
@injectives injectives changed the title Feature/open Add ability of checking if result handle is open Mar 23, 2022
This update introduces a new method to result handles for checking if result is open:
- `Result.isOpen()`
- `ResultCursor.isOpenAsync()`
- `RxResult.isOpen()`

Result is considered to be open if it has not been consumed via the consume method and its creator object (e.g. session or transaction) has not been closed (including committed or rolled back).

Attempts to access data on closed result will produce {@link ResultConsumedException}.

Implementation is based on existing internal logic.
@injectives injectives marked this pull request as ready for review March 23, 2022 11:49
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.

LGTM (the all time classic, but we did actually discuss this).

@injectives injectives merged commit 80a6333 into neo4j:5.0 Mar 23, 2022
@injectives injectives deleted the feature/open branch March 23, 2022 15:11
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