pashagolub / pgxmock

pgx mock driver for golang to test database interactions
Other
386 stars 49 forks source link

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

Closed pashagolub closed 10 months ago

pashagolub commented 10 months ago
MikeTaylor commented 10 months ago

Aren't these interface renamings backwards-incompatible?

pashagolub commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

Thanks, I think that makes sense!