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

Fixed PostgresDriver (for jvmMain) to correctly make use of the connection pool. #54

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

smyrgeorge
Copy link
Contributor

I just made the appropriate changes.
Before the code was using just a single connection. 😄

…pool.

Also, some minor changes for logging in jvmTest.
…pool.

Also, some minor changes for logging in jvmTest.
Copy link
Owner

@moreirasantos moreirasantos left a comment

Choose a reason for hiding this comment

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

Thank you for your implementations!

I haven't noticed that r2dbc wasn't using a pool, so I'll have to test the before and after when I can. Please keep in mind that I'll most likely be away from keyboard for a few days.
Cheers!

README.md Outdated Show resolved Hide resolved
build.gradle.kts Show resolved Hide resolved
Co-authored-by: Miguel <[email protected]>
@smyrgeorge
Copy link
Contributor Author

smyrgeorge commented May 28, 2024

I realized that isn't using the connection pool because I was reviewing the whole codebase in order to support transactions.
In a future PR I can provide the implementation.
I think, for now, we should be more "focused" on creating a bit more "stable" interfaces/wrappers in order to support more features (like transactions).
I think the r2dbc codebase can guide us a bit on that.
Then in the future we can change the underlying engines.
For instance for the native part we could use sqlx (rust lib) through c bindings (same as we do now with libpq).

Let me know about the comments above 😄

@moreirasantos
Copy link
Owner

Indeed, that was my idea when adding r2dbc (having something to compare to). One thing that jumps out right away for example, is sending multiple SQL statements in one go, which r2dbc already supports and this interface kind of hides/limits that.
Thank you again :)

@smyrgeorge
Copy link
Contributor Author

Sure! So, I'll do the changes later on and in the next days I'll provide the implementation for the transactions.
At least I'll try to 😄

@smyrgeorge
Copy link
Contributor Author

smyrgeorge commented May 29, 2024

Hello! I just made the changes according to the conversation above.
Please feel free to review and then close the PR 😄

@smyrgeorge smyrgeorge requested a review from moreirasantos May 29, 2024 14:47
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