Skip to content

Conversation

iheanyi
Copy link
Contributor

@iheanyi iheanyi commented Jul 29, 2022

This pull request takes away the management of sessions from the Client and pushes that responsibility down to the new Connection class. This way, we can have multiple connections per-client, with client inherently becoming stateless. If a connection needs to be re-used, then users can query directly from the connection itself and it's session will be persisted across transactions and such.

I also removed the try/catch block from execute. If something unexpected goes wrong, I think we should bubble that up to the user and let them figure out how they want to handle it. I'm wondering if we should do something for postJSON as well, to be honest.

@iheanyi iheanyi requested a review from dgraham July 29, 2022 19:34
@iheanyi iheanyi merged commit 434cd8d into main Jul 29, 2022
@iheanyi iheanyi deleted the iheanyi/abstract-out-connection branch July 29, 2022 20:01
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