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

chg: refactor adapter code to be async, functional and safe #3

Open
twilson63 opened this issue Sep 7, 2021 · 0 comments
Open

chg: refactor adapter code to be async, functional and safe #3

twilson63 opened this issue Sep 7, 2021 · 0 comments

Comments

@twilson63
Copy link
Contributor

The current code works, but it is very imperative and can potentially block transactions, because each query is executed synchronously, I recommend we wrap the query in a promise to give control back to the program while executing.

TillaTheHun0 added a commit that referenced this issue Mar 8, 2022
BREAKING CHANGE - caught exceptions are resolved, not rejected, as hyper
errors

The only time a method on the adapter should return a rejected promise
is in the case of an unhandled exception.

Aligns with discussion detailed in:
https://github.com/hyper63/journal/blob/master/design-docs/003-errors.md

Also Asyncified the code #3
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

No branches or pull requests

1 participant