Skip to content

Conversation

@ali-ince
Copy link
Contributor

@ali-ince ali-ince commented Aug 21, 2019

This PR modifies existing API's to return Promises instead of the previous callback mechanism.

  1. Driver.close() now returns Promise<void>.
  2. Transaction.commit() and Transaction.rollback() now returns Promise<void> rather than the internal Result object which holds more and confusing information not applicable to the underlying commit/rollback operation (resolves Commit() return values do not have actions taken #260).
  3. Internal Pool implementation now stores it's closed state and now is able to return errors if it's asked for a new connection (resolves Session and driver not closing; can still post queries @1.7.2 #442).
  4. Refactored stub tests so that they run faster and are now compatible with latest promise returning functions.

Based on #445.

@ali-ince ali-ince requested a review from zhenlineo August 21, 2019 16:12
@ali-ince ali-ince merged commit 07ec4cb into neo4j:2.0 Aug 27, 2019
@ali-ince ali-ince deleted the 2.0-return-promise branch August 27, 2019 16:03
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.

Session and driver not closing; can still post queries @1.7.2 Commit() return values do not have actions taken

1 participant