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

Implement WithConnection for pgx and pgx5 database drivers #982

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bclarkx2
Copy link

Enable consumers to provide an existing *sql.DB with the option to close the connection without closing the underlying *sql.DB instance.

See #659 for a change doing the same for the lib/pq database driver, and #583 for MySQL.

Tests verified locally with:
make test-short DATABASE='pgx pgx5'

@coveralls
Copy link

coveralls commented Jan 30, 2024

Coverage Status

coverage: 59.315% (+0.09%) from 59.226%
when pulling afde1f7 on nicheinc:master
into a5dc5d1 on golang-migrate:master.

@bclarkx2
Copy link
Author

@dhui I updated this PR to handle the table-based locking introduced to the pgx driver in #992, so all the tests are passing now 🚀

Please let me know if there is anything else that could be done to improve this PR and move it toward the finish line. Cheers!

@bclarkx2
Copy link
Author

@dhui Sorry to ping again, but I just wanted to check if there's anything else I can do to help move this PR forward. We're hoping to use this to implement a migrator that can be closed without closing the underlying connection pool using the pgx driver, so I'm very interested to help remove any blockers that remain!

Cheers

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.

None yet

2 participants