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

Add support for ConnInfo #85

Closed
jsnb-devoted opened this issue Jul 31, 2022 · 0 comments
Closed

Add support for ConnInfo #85

jsnb-devoted opened this issue Jul 31, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jsnb-devoted
Copy link
Contributor

Is your feature request related to a problem? Please describe.
We are developing an app that uses ConnInfo method in pgx (link). We have our own interface for mocking but we want to move to pgxmock the issue I'm running into now is that our interface isn't compatible because the pgxIface is missing the ConnInfo method:

cannot use mock (variable of type pgxmock.PgxConnIface) as DBConn value in argument to getAllTables: pgxmock.PgxConnIface does not implement DBConn (missing method ConnInfo)

Describe the solution you'd like
Add the ConnInfo method to the interface if that is sensible/backwards compatible.

Describe alternatives you've considered
We are effectively doing the alternative by having our own interface but we are missing all the great unit testing functionality in pgxmock that we would like to use.

Additional context
I'll submit a naive PR for this. I suspect adding this could cause issues for current users of the package. I'm newer to go package development.

@pashagolub pashagolub self-assigned this Aug 1, 2022
@pashagolub pashagolub added the enhancement New feature or request label Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants