Open sweatybridge opened 1 year ago
I was confused by this too, especially as the pgx repo still links to github.com/jackc/pgmock, and the test/example uses github.com/jackc/pgproto3/v2, but https://pkg.go.dev/github.com/jackc/pgproto3/v2 says
github.com/jackc/pgproto3/v2
This version is used with pgx v4. In pgx v5 it is part of the https://github.com/jackc/pgx repository.
For now I seem to be able to use pgxmock with pgproto3/v2; it doesn't actually care about the v4 or v5 flavours of the pgx API for mocking out queries and responses. So it's mostly just a bit ugly to have to require both the pgx v4 stuff and pgx v5.
I was confused by this too, especially as the pgx repo still links to github.com/jackc/pgmock, and the test/example uses
github.com/jackc/pgproto3/v2
, but https://pkg.go.dev/github.com/jackc/pgproto3/v2 saysFor now I seem to be able to use pgxmock with pgproto3/v2; it doesn't actually care about the v4 or v5 flavours of the pgx API for mocking out queries and responses. So it's mostly just a bit ugly to have to require both the pgx v4 stuff and pgx v5.