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

[*] make Expect* methods visible in the docs, closes #181 #182

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

pashagolub
Copy link
Owner

  • rename pgxMockIface to Expecter
  • rename pgxIface to PgxCommonIface
  • move Config() methods to proper interfaces
  • make expectation hidden

- rename `pgxMockIface` to `Expecter`
- rename `pgxIface` to `PgxCommonIface`
- move `Config()` methods to proper interfaces
- make `expectation` hidden
@pashagolub pashagolub added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 21, 2023
@pashagolub pashagolub self-assigned this Dec 21, 2023
@pashagolub pashagolub linked an issue Dec 21, 2023 that may be closed by this pull request
@pashagolub pashagolub merged commit 7447a72 into master Dec 21, 2023
4 checks passed
@pashagolub pashagolub deleted the 181-iface-docs branch December 21, 2023 12:58
@MikeTaylor
Copy link

Aren't these interface renamings backwards-incompatible?

@pashagolub
Copy link
Owner Author

People should define their own interfaces in a real life. Even if they don't, the main interfaces are still the same: PgxConnIface and PgxPoolIface

@MikeTaylor
Copy link

This is probably the wrong place to discuss it, but I have never really understood why we are expected to define our own interfaces.

@pashagolub
Copy link
Owner Author

pashagolub commented Dec 21, 2023

Because pgxmock is for tests only. I don't think, you want to have a testing module dependency in your production code. You are free to use it, of course.

And because the only interface in pgx is pgx.Tx

@MikeTaylor
Copy link

Thanks, I think that makes sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pgxmock.ExpectBegin is not documented
2 participants