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

feat: add SQLDB() to get the underlying database/sql.(*DB) from a store #830

Closed
wants to merge 1 commit into from

Conversation

alnr
Copy link
Contributor

@alnr alnr commented Sep 11, 2023

What is being done in this PR?

This allows pop users to obtain a handle to the underlying connection pool (database/sql.(*DB)). This is useful, for example, to collect Prometheus metrics about the status of the connection pool.

What are the main choices made to get to this solution?

It was the simplest way. The current design of a pop/(*Tx) implementing the store interface is not optimal, and perhaps a distinctions should be made between a datastore and a transaction (since they are different concepts). But that's a bigger refactoring.

I'd also be open to different implementation strategies.

List the manual test cases you've covered before sending this PR:

Not sure this needs any tests, really.

@github-actions
Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment. Otherwise, this will be closed in 7 days.

@github-actions github-actions bot added the stale label Oct 27, 2023
Copy link

github-actions bot commented Nov 3, 2023

This PR was closed because it has been stalled for 45+7 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants